Class EmptyStructuredConfigProperties
- java.lang.Object
-
- io.opentelemetry.sdk.autoconfigure.spi.internal.EmptyStructuredConfigProperties
-
- All Implemented Interfaces:
StructuredConfigProperties
final class EmptyStructuredConfigProperties extends java.lang.Object implements StructuredConfigProperties
Empty instance ofStructuredConfigProperties.
-
-
Field Summary
Fields Modifier and Type Field Description private static EmptyStructuredConfigPropertiesINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateEmptyStructuredConfigProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleangetBoolean(java.lang.String name)Returns aBooleanconfiguration property.java.lang.DoublegetDouble(java.lang.String name)Returns aDoubleconfiguration property.(package private) static EmptyStructuredConfigPropertiesgetInstance()java.lang.IntegergetInt(java.lang.String name)Returns aIntegerconfiguration property.java.lang.LonggetLong(java.lang.String name)Returns aLongconfiguration property.java.util.Set<java.lang.String>getPropertyKeys()Returns a set of all configuration property keys.<T> java.util.List<T>getScalarList(java.lang.String name, java.lang.Class<T> scalarType)Returns aListconfiguration property.java.lang.StringgetString(java.lang.String name)Returns aStringconfiguration property.StructuredConfigPropertiesgetStructured(java.lang.String name)Returns aStructuredConfigPropertiesconfiguration property.java.util.List<StructuredConfigProperties>getStructuredList(java.lang.String name)Returns a list ofStructuredConfigPropertiesconfiguration property.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.sdk.autoconfigure.spi.internal.StructuredConfigProperties
getBoolean, getDouble, getInt, getLong, getScalarList, getString, getStructured, getStructuredList
-
-
-
-
Field Detail
-
INSTANCE
private static final EmptyStructuredConfigProperties INSTANCE
-
-
Method Detail
-
getInstance
static EmptyStructuredConfigProperties getInstance()
-
getString
@Nullable public java.lang.String getString(java.lang.String name)
Description copied from interface:StructuredConfigPropertiesReturns aStringconfiguration property.- Specified by:
getStringin interfaceStructuredConfigProperties- Returns:
- null if the property has not been configured
-
getBoolean
@Nullable public java.lang.Boolean getBoolean(java.lang.String name)
Description copied from interface:StructuredConfigPropertiesReturns aBooleanconfiguration property. Implementations should use the same rules asBoolean.parseBoolean(String)for handling the values.- Specified by:
getBooleanin interfaceStructuredConfigProperties- Returns:
- null if the property has not been configured
-
getInt
@Nullable public java.lang.Integer getInt(java.lang.String name)
Description copied from interface:StructuredConfigPropertiesReturns aIntegerconfiguration property.If the underlying config property is
Long, it is converted toIntegerwithLong.intValue()which may result in loss of precision.- Specified by:
getIntin interfaceStructuredConfigProperties- Returns:
- null if the property has not been configured
-
getLong
@Nullable public java.lang.Long getLong(java.lang.String name)
Description copied from interface:StructuredConfigPropertiesReturns aLongconfiguration property.- Specified by:
getLongin interfaceStructuredConfigProperties- Returns:
- null if the property has not been configured
-
getDouble
@Nullable public java.lang.Double getDouble(java.lang.String name)
Description copied from interface:StructuredConfigPropertiesReturns aDoubleconfiguration property.- Specified by:
getDoublein interfaceStructuredConfigProperties- Returns:
- null if the property has not been configured
-
getScalarList
@Nullable public <T> java.util.List<T> getScalarList(java.lang.String name, java.lang.Class<T> scalarType)Description copied from interface:StructuredConfigPropertiesReturns aListconfiguration property. Empty values and values which do not map to thescalarTypewill be removed.- Specified by:
getScalarListin interfaceStructuredConfigProperties- Parameters:
name- the property namescalarType- the scalar type, one ofString,Boolean,LongorDouble- Returns:
- a
Listconfiguration property, or null if the property has not been configured
-
getStructured
@Nullable public StructuredConfigProperties getStructured(java.lang.String name)
Description copied from interface:StructuredConfigPropertiesReturns aStructuredConfigPropertiesconfiguration property.- Specified by:
getStructuredin interfaceStructuredConfigProperties- Returns:
- a map-valued configuration property, or
nullifnamehas not been configured
-
getStructuredList
@Nullable public java.util.List<StructuredConfigProperties> getStructuredList(java.lang.String name)
Description copied from interface:StructuredConfigPropertiesReturns a list ofStructuredConfigPropertiesconfiguration property.- Specified by:
getStructuredListin interfaceStructuredConfigProperties- Returns:
- a list of map-valued configuration property, or
nullifnamehas not been configured
-
getPropertyKeys
public java.util.Set<java.lang.String> getPropertyKeys()
Description copied from interface:StructuredConfigPropertiesReturns a set of all configuration property keys.- Specified by:
getPropertyKeysin interfaceStructuredConfigProperties- Returns:
- the configuration property keys
-
-