public static interface AnnotatedSettings.Builder
| 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) |
AnnotatedSettings.Builder apply(Consumer<AnnotatedSettings.Builder> configuration)
AnnotatedSettings.Builder useNamingConvention(SettingNamingConvention convention)
AnnotatedSettings.Builder collectMembersRecursively()
AnnotatedSettings.Builder collectOnlyAnnotatedMembers()
Setting.
This setting has no effect on classes annotated with @Settings,
as it is superseded by Settings.onlyAnnotated().
Settings.onlyAnnotated()AnnotatedSettings.Builder collectMembersWith(MemberCollector collector)
<T> AnnotatedSettings.Builder registerTypeMapping(Class<? super T> clazz, ConfigType<T,?,?> type)
ConfigType.
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
registerTypeMapping(Class, ParameterizedTypeProcessor) instead.
T - The type of fields to map.clazz - The Class object for the type of fields to map.type - The mapped to ConfigType.registerTypeMapping(Class, ParameterizedTypeProcessor),
ConfigType<T> AnnotatedSettings.Builder registerTypeMapping(Class<? super T> clazz, ParameterizedTypeProcessor<T> processor)
ConfigType.
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
registerTypeMapping(Class, ConfigType) instead.
T - 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.registerTypeMapping(Class, ConfigType),
ParameterizedTypeProcessor<A extends Annotation> AnnotatedSettings.Builder registerSettingProcessor(Class<A> annotationType, LeafAnnotationProcessor<A> processor)
A - the type of annotation to processannotationType - a class representing the type of annotation to processprocessor - a processor for this annotationthis, for chainingIllegalArgumentException - if annotationType does not have RUNTIME retention<A extends Annotation> AnnotatedSettings.Builder registerGroupProcessor(Class<A> annotationType, BranchAnnotationProcessor<A> processor)
Setting.Group.A - the type of annotation to processannotationType - a class representing the type of annotation to processprocessor - a processor for this annotationthis, for chainingIllegalArgumentException - if annotationType does not have RUNTIME retention<A extends Annotation> AnnotatedSettings.Builder registerConstraintProcessor(Class<A> annotationType, ConstraintAnnotationProcessor<A> processor)
A - the type of annotation to processannotationType - a class representing the type of annotation to processprocessor - a processor for this annotationthis, for chainingIllegalArgumentException - if annotationType does not have RUNTIME retentionAnnotatedSettings build()