Partager via


ConfigurationProperty<T> Class

  • java.lang.Object
    • com.azure.core.util.ConfigurationProperty<T>

Type Parameters

T

Type of property value.

public final class ConfigurationProperty

Represents configuration property.

Method Summary

Modifier and Type Method and Description
Iterable<String> getAliases()

Gets property aliases - alternative names property can have.

Function<String,T> getConverter()

Gets converter for property value.

T getDefaultValue()

Gets property default value to be used when property is missing in the configuration.

String getEnvironmentVariableName()

Gets name of environment variables this property can be configured with.

String getName()

Gets full property name including relative path to it.

String getSystemPropertyName()

Gets name of system property this property can be configured with.

Function<String,String> getValueSanitizer()

Returns property value sanitizer that is used to securely log property value.

boolean isRequired()

Returns true if property is required, used for validation purposes.

boolean isShared()

Returns true if property can be shared between clients and get(ConfigurationProperty<T> property) should look for it in per-client and root sections.

Methods inherited from java.lang.Object

Method Details

getAliases

public Iterable getAliases()

Gets property aliases - alternative names property can have.

Returns:

array of name aliases.

getConverter

public Function getConverter()

Gets converter for property value.

Returns:

property value converter.

getDefaultValue

public T getDefaultValue()

Gets property default value to be used when property is missing in the configuration.

Returns:

default value.

getEnvironmentVariableName

public String getEnvironmentVariableName()

Gets name of environment variables this property can be configured with.

Returns:

environment variable name.

getName

public String getName()

Gets full property name including relative path to it.

Returns:

property name.

getSystemPropertyName

public String getSystemPropertyName()

Gets name of system property this property can be configured with.

Returns:

system property name.

getValueSanitizer

public Function getValueSanitizer()

Returns property value sanitizer that is used to securely log property value.

Returns:

function that sanitizes property value.

isRequired

public boolean isRequired()

Returns true if property is required, used for validation purposes.

Returns:

flag indicating if the property is required.

isShared

public boolean isShared()

Returns true if property can be shared between clients and get(ConfigurationProperty<T> property) should look for it in per-client and root sections.

Returns:

flag indicating if the property is shared.

Applies to