public final class AnnotatedSettingsBuilderImpl extends Object implements AnnotatedSettings.Builder
| Constructor and Description |
|---|
AnnotatedSettingsBuilderImpl() |
| Modifier and Type | Method and Description |
|---|---|
AnnotatedSettings.Builder |
apply(Consumer<AnnotatedSettings.Builder> configuration) |
AnnotatedSettings |
build() |
AnnotatedSettings.Builder |
collectMembersRecursively() |
AnnotatedSettings.Builder |
collectMembersWith(MemberCollector collector) |
AnnotatedSettings.Builder |
collectOnlyAnnotatedMembers()
Specifies whether or not all fields in processed classes should be considered
as config value candidates, or only those annotated with
Setting. |
<A extends Annotation> |
registerConstraintProcessor(Class<A> annotationType,
ConstraintAnnotationProcessor<A> processor)
Registers a constraint annotation processor, tasked with processing annotations on config types.
|
<A extends Annotation> |
registerGroupProcessor(Class<A> annotationType,
BranchAnnotationProcessor<A> processor)
Registers a group annotation processor, tasked with processing annotations on ancestor fields (config fields annotated with
Setting.Group. |
<A extends Annotation> |
registerSettingProcessor(Class<A> annotationType,
LeafAnnotationProcessor<A> processor)
Registers a setting annotation processor, tasked with processing annotations on config fields.
|
<T> AnnotatedSettings.Builder |
registerTypeMapping(Class<? super T> clazz,
ConfigType<T,?,?> type)
Registers a type mapping from a Java type to a
ConfigType. |
<T> AnnotatedSettings.Builder |
registerTypeMapping(Class<? super T> clazz,
ParameterizedTypeProcessor<T> processor)
Registers a type mapping from a parameterized Java type to a family of
ConfigType. |
AnnotatedSettings.Builder |
useNamingConvention(SettingNamingConvention convention) |
public AnnotatedSettings.Builder apply(Consumer<AnnotatedSettings.Builder> configuration)
apply in interface AnnotatedSettings.Builderpublic AnnotatedSettings.Builder collectMembersRecursively()
collectMembersRecursively in interface AnnotatedSettings.Builderpublic AnnotatedSettings.Builder collectOnlyAnnotatedMembers()
AnnotatedSettings.BuilderSetting.
This setting has no effect on classes annotated with @Settings,
as it is superseded by Settings.onlyAnnotated().
collectOnlyAnnotatedMembers in interface AnnotatedSettings.BuilderSettings.onlyAnnotated()public AnnotatedSettings.Builder collectMembersWith(MemberCollector collector)
collectMembersWith in interface AnnotatedSettings.Builderpublic AnnotatedSettings.Builder useNamingConvention(SettingNamingConvention convention)
useNamingConvention in interface AnnotatedSettings.Builderpublic <T> AnnotatedSettings.Builder registerTypeMapping(Class<? super T> clazz, ConfigType<T,?,?> type)
AnnotatedSettings.BuilderConfigType.
Fields of the given type in POJOs are mapped to nodes storing values of the
given ConfigType.
This method should be used to register type mappings for non-parameterized types.
For registering type mappings for parameterized types, use
AnnotatedSettings.Builder.registerTypeMapping(Class, ParameterizedTypeProcessor) instead.
registerTypeMapping in interface AnnotatedSettings.BuilderT - The type of fields to map.clazz - The Class object for the type of fields to map.type - The mapped to ConfigType.AnnotatedSettings.Builder.registerTypeMapping(Class, ParameterizedTypeProcessor),
ConfigTypepublic <T> AnnotatedSettings.Builder registerTypeMapping(Class<? super T> clazz, ParameterizedTypeProcessor<T> processor)
AnnotatedSettings.BuilderConfigType.
Fields of instantiations of the given type are mapped to nodes storing values of
ConfigType created via the given ParameterizedTypeProcessor.
This method should be used to register type mappings for parameterized types.
For registering type mappings for non-parameterized types, use
AnnotatedSettings.Builder.registerTypeMapping(Class, ConfigType) instead.
registerTypeMapping in interface AnnotatedSettings.BuilderT - The type of fields to map.clazz - The Class object for the type of fields to map.processor - A function taking actual type arguments and returning a suitable
ConfigType.AnnotatedSettings.Builder.registerTypeMapping(Class, ConfigType),
ParameterizedTypeProcessorpublic <A extends Annotation> AnnotatedSettings.Builder registerSettingProcessor(Class<A> annotationType, LeafAnnotationProcessor<A> processor)
registerSettingProcessor in interface AnnotatedSettings.BuilderA - the type of annotation to processannotationType - a class representing the type of annotation to processprocessor - a processor for this annotationthis, for chainingpublic <A extends Annotation> AnnotatedSettings.Builder registerGroupProcessor(Class<A> annotationType, BranchAnnotationProcessor<A> processor)
Setting.Group.registerGroupProcessor in interface AnnotatedSettings.BuilderA - the type of annotation to processannotationType - a class representing the type of annotation to processprocessor - a processor for this annotationthis, for chainingpublic <A extends Annotation> AnnotatedSettings.Builder registerConstraintProcessor(Class<A> annotationType, ConstraintAnnotationProcessor<A> processor)
registerConstraintProcessor in interface AnnotatedSettings.BuilderA - the type of annotation to processannotationType - a class representing the type of annotation to processprocessor - a processor for this annotationthis, for chainingpublic AnnotatedSettings build()
build in interface AnnotatedSettings.Builder