Package com.blackbuild.klum.ast
Annotation Interface Converters
Handles implicit and explicit converter creation. KlumAST creates converter methods from all "factory-like" methods
in the target class. A factory-like method is a public static method that returns the specified type or one of its
subclasses and whose name matches one of the prefixes: from, of, create, parse.
Note that the annotation on a field completely replaces the annotation on the class for that field.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIf set to false, the default prefixes are ignored.String[]Prefixes of static methods that should not be considered factories.booleanIf set to true, public constructors of a target class are used for converters as well.String[]Prefixes of static methods that are considered factories.Class[]Additional classes that are searched for factory methods.
-
Element Details
-
includeMethods
String[] includeMethodsPrefixes of static methods that are considered factories.- Default:
- {}
-
excludeMethods
String[] excludeMethodsPrefixes of static methods that should not be considered factories. If both includes and excludes are defined, excludes wins over includes, i.e. methods that are included can later be excluded.- Default:
- {}
-
excludeDefaultPrefixes
boolean excludeDefaultPrefixesIf set to false, the default prefixes are ignored. In that case, only explicitly defined includes (or ALL methods, if no includes are set!) are considered.- Default:
- false
-
value
Class[] valueAdditional classes that are searched for factory methods.- Default:
- {}
-
includeConstructors
boolean includeConstructorsIf set to true, public constructors of a target class are used for converters as well.- Default:
- false
-