public class JavaConfigurationMetadataBuilder extends ConfigurationMetadataBuilder<TypeElement>
ConfigurationMetadataBuilder for Java.ConfigurationMetadataBuilder| Constructor and Description |
|---|
JavaConfigurationMetadataBuilder(Elements elements,
Types types,
AnnotationUtils annotationUtils) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildPropertyPath(TypeElement owningType,
TypeElement declaringType,
String propertyName)
Build a property path for the given declaring type and property name.
|
protected String |
buildTypePath(TypeElement owningType,
TypeElement declaringType)
Variation of
ConfigurationMetadataBuilder.buildPropertyPath(Object, Object, String) for types. |
Elements |
getElements() |
protected String |
getTypeString(TypeElement type)
Convert the given type to a string.
|
getConfigurations, getProperties, hasMetadata, visitProperties, visitProperty, visitPropertypublic JavaConfigurationMetadataBuilder(Elements elements, Types types, AnnotationUtils annotationUtils)
protected String buildPropertyPath(TypeElement owningType, TypeElement declaringType, String propertyName)
ConfigurationMetadataBuilderBuild a property path for the given declaring type and property name.
For ConfigurationProperties that path is a property is
established by looking at the value of the ConfigurationProperties and
then calculating the path based on the inheritance tree.
For example consider the following classes:
@ConfigurationProperties("parent")
public class ParentProperties {
String foo;
}
@ConfigurationProperties("child")
public class ChildProperties extends ParentProperties {
String bar;
}
The path of the property foo will be "parent.foo" whilst the path of the property bar will
be "parent.child.bar" factoring in the class hierarchy
Inner classes hierarchies are also taken into account
buildPropertyPath in class ConfigurationMetadataBuilder<TypeElement>owningType - The owning typedeclaringType - The declaring typepropertyName - The property nameprotected String buildTypePath(TypeElement owningType, TypeElement declaringType)
ConfigurationMetadataBuilderConfigurationMetadataBuilder.buildPropertyPath(Object, Object, String) for types.buildTypePath in class ConfigurationMetadataBuilder<TypeElement>owningType - The owning typedeclaringType - The typeprotected String getTypeString(TypeElement type)
ConfigurationMetadataBuildergetTypeString in class ConfigurationMetadataBuilder<TypeElement>type - The type