Package pro.projo.template.annotation
Interface Configuration
public interface Configuration
The
Configuration interface describes the fully-qualified class name and the input
parameters for an individual template invocation. A template can be invoke multiple times
with different configurations.- Author:
- Mirko Raner
-
Method Summary
Modifier and Type Method Description static Optionsdefaults()StringfullyQualifiedClassName()default booleanisDefault(Function<Options,?> option)Checks if the specified option is set to the default value.default booleanisDefault(Options options, Function<Options,?> option)default Optionsoptions()Retrieves additional configuration options that were provided as an annotation parameter or package annotation.Map<String,Object>parameters()default UnaryOperator<Writer>postProcessor()
-
Method Details
-
fullyQualifiedClassName
String fullyQualifiedClassName()- Returns:
- the fully qualified name of the class to be generated
-
parameters
- Returns:
- additional parameters that need to be inserted into the code generation template
-
postProcessor
- Returns:
- an operator that wraps the output writer into a filtering writer for post-processing
-
options
Retrieves additional configuration options that were provided as an annotation parameter or package annotation. -
isDefault
Checks if the specified option is set to the default value. This method will also return true if an option parameter was specified but happens to be identical to the default value (e.g.,@Option(fileExtension=".java")).- Parameters:
option- the option to check (typically as a method reference)- Returns:
trueif the option value is identical to the default value,falseotherwise
-
isDefault
-
defaults
-