Package io.smallrye.config
Class ConfigMappingInterface
- java.lang.Object
-
- io.smallrye.config.ConfigMappingInterface
-
- All Implemented Interfaces:
ConfigMappingMetadata
public final class ConfigMappingInterface extends Object implements ConfigMappingMetadata
The metadata reprensentation of aConfigMappingannotated class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfigMappingInterface.CollectionPropertystatic classConfigMappingInterface.DefaultMethodPropertystatic classConfigMappingInterface.GroupPropertystatic classConfigMappingInterface.LeafPropertystatic classConfigMappingInterface.MapPropertystatic classConfigMappingInterface.MayBeOptionalPropertystatic classConfigMappingInterface.OptionalPropertystatic classConfigMappingInterface.PrimitivePropertystatic classConfigMappingInterface.Propertystatic classConfigMappingInterface.ToStringMethod
-
Method Summary
-
-
-
Method Detail
-
getConfigurationInterface
public static ConfigMappingInterface getConfigurationInterface(Class<?> interfaceType)
Get the configuration interface information for the given interface class. This information is cached.- Parameters:
interfaceType- the interface type (must not benull)- Returns:
- the configuration interface, or
nullif the type does not appear to be a configuration interface
-
getInterfaceType
public Class<?> getInterfaceType()
Get the configuration interface type.- Specified by:
getInterfaceTypein interfaceConfigMappingMetadata- Returns:
- the configuration interface type
-
getClassName
public String getClassName()
Get the generated implementation class name. The class name is the configuration interface type name, plus the hashcode of the configuration interface type name with the suffixImpl.- Specified by:
getClassNamein interfaceConfigMappingMetadata- Returns:
- the generated implementation class name
-
getSuperTypes
public ConfigMappingInterface[] getSuperTypes()
Get the array ofConfigMappingInterfacesuper types relative to thisConfigMappingInterface. The array includes all super types untiljava.lang.Object.- Returns:
- the array of
ConfigMappingInterfacesuper types
-
getProperties
public ConfigMappingInterface.Property[] getProperties()
Get the array ofConfigMappingInterface.Propertyrelative to thisConfigMappingInterface. The array includes all properties, including properties contributed by super types.- Returns:
- the array of
ConfigMappingInterface.Property
-
getNames
public Map<String,Map<String,Set<String>>> getNames()
Constructs a representation of allConfigMappingInterface.Propertynames contained in theConfigMappingInterface.- Returns:
- a
Mapwith the mapping properties names - See Also:
getNames(ConfigMappingInterface)
-
hasNamingStrategy
public boolean hasNamingStrategy()
-
getNamingStrategy
public ConfigMapping.NamingStrategy getNamingStrategy()
-
getClassBytes
public byte[] getClassBytes()
- Specified by:
getClassBytesin interfaceConfigMappingMetadata
-
getNames
public static Map<String,Map<String,Set<String>>> getNames(ConfigMappingInterface configMapping)
Constructs a representation of allConfigMappingInterface.Propertynames contained in theConfigMappingInterface.- The first level
Mapkey is eachClassname that is part of the mapping - The second level
Mapkey is eachStringpath - The
Setcontains allConfigMappingInterface.PropertyStringnames under the mapping path, including sub-elements and nested elements
ConfigMapping.prefix()because the sameConfigMappingInterfacecan be registered for multiple prefixes.The mapping class root
ConfigMappingInterface.Propertyuse the emptyStringfor the path key.- Parameters:
configMapping- aConfigMappingInterfacerepresentation of aConfigMappingannotated class- Returns:
- a
Mapwith the mapping properties names
- The first level
-
getProperties
public static Map<Class<?>,Map<String,Map<String,ConfigMappingInterface.Property>>> getProperties(ConfigMappingInterface configMapping)
Constructs a representation of allConfigMappingInterface.Propertycontained in theConfigMappingInterface.- The first level
Mapkey is eachClassthat is part of the mapping - The second level
Mapkey is eachStringpath in the mapping to aConfigMappingInterface.Property - The third level
Mapkey is eachStringConfigMappingInterface.Propertyname under the mapping path, including sub-elements and nested elements
ConfigMapping.prefix()because the sameConfigMappingInterfacecan be registered for multiple prefixes.The mapping class root
ConfigMappingInterface.Propertyuse the emptyStringfor the path key.- Parameters:
configMapping- aConfigMappingInterfacerepresentation of aConfigMappingannotated class- Returns:
- a
MapwithConfigMappingInterface.Propertyvalues
- The first level
-
-