Class SystemProperty
For library instrumentation, prefer programmatic configuration. Direct property lookup is needed only when a programmatic configuration surface cannot be exposed. Once declarative instrumentation configuration is stable, use it instead. Current examples include library instrumentation entry points loaded through an SPI, driver, or similar mechanism.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BooleangetBoolean(String propertyName) Returns the boolean value of the given property name from system properties and environment variables.static booleangetBoolean(String propertyName, boolean defaultValue) Returns the boolean value of the given property name from system properties and environment variables.static intReturns the int value of the given property name from system properties and environment variables.Returns the list of strings value of the given property name from system properties and environment variables, ornullif not found.Returns the list of strings value of the given property name from system properties and environment variables, or the default value if not found.static StringReturns the string value of the given property name from system properties and environment variables.static StringReturns the string value of the given property name from system properties and environment variables, or the default value if not found.
-
Method Details
-
getBoolean
Returns the boolean value of the given property name from system properties and environment variables.It's recommended to use
ConfigProviderinstead to support Declarative Config. -
getBoolean
Returns the boolean value of the given property name from system properties and environment variables.It's recommended to use
ConfigProviderinstead to support Declarative Config. -
getInt
Returns the int value of the given property name from system properties and environment variables.It's recommended to use
ConfigProviderinstead to support Declarative Config. -
getString
Returns the string value of the given property name from system properties and environment variables.It's recommended to use
ConfigProviderinstead to support Declarative Config. -
getString
Returns the string value of the given property name from system properties and environment variables, or the default value if not found.It's recommended to use
ConfigProviderinstead to support Declarative Config. -
getList
Returns the list of strings value of the given property name from system properties and environment variables, or the default value if not found. The property value is expected to be a comma-separated list.It's recommended to use
ConfigProviderinstead to support Declarative Config. -
getList
Returns the list of strings value of the given property name from system properties and environment variables, ornullif not found. The property value is expected to be a comma-separated list.It's recommended to use
ConfigProviderinstead to support Declarative Config.
-