Interface CustomAnnotationRegistry.AnnotationResolver<T extends Annotation>
-
- Type Parameters:
T
- type of the annotation resolved
- Enclosing class:
- CustomAnnotationRegistry
public static interface CustomAnnotationRegistry.AnnotationResolver<T extends Annotation>
Represents annotation resolver, responsible for........ wait for it....... resolving custom annotations!!!
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Supplier<FieldTypeResolver>
typeResolver()
Called when it is being read from the config, should return aSupplier
of the annotation'sFieldTypeResolver
.void
write(CustomAnnotationRegistry.AnnotationWriter writer, T annotation, CustomAnnotationRegistry.AnnotationResolverContext context)
Called when a brand new config is being generated, should write the custom annotation's values to the writer with the desired syntax of the config type.
-
-
-
Method Detail
-
write
void write(CustomAnnotationRegistry.AnnotationWriter writer, T annotation, CustomAnnotationRegistry.AnnotationResolverContext context)
Called when a brand new config is being generated, should write the custom annotation's values to the writer with the desired syntax of the config type. There are syntax exceptions for config types the project maintains itself, and they are the following:- TOML: When writing something, it needs to be in the format
key=value
, or be a map.
- Parameters:
writer
- writerannotation
- annotation writtencontext
- writer context
- TOML: When writing something, it needs to be in the format
-
typeResolver
Supplier<FieldTypeResolver> typeResolver()
Called when it is being read from the config, should return aSupplier
of the annotation'sFieldTypeResolver
.- Returns:
- field type resolver supplier
-
-