@Target(value=PACKAGE) @Retention(value=RUNTIME) public @interface Options
@Options annotation captures various settings that affect the compile-time
code generation triggered by the @Interface and @Enum annotations.
An @Options annotation can be used stand-alone at package level, where it will
affect code generation for the entire package, or as an argument to individual
@Interface or @Enum annotations, where it will define (or override)
the settings for just that annotation.| Modifier and Type | Optional Element and Description |
|---|---|
Ternary |
addAnnotations
The option for adding annotations (such as
@Generated). |
String |
fileExtension
The file extension to be used for generated files.
|
StandardLocation |
outputLocation
The output location for generated files with a custom file extension.
|
Class<? extends UnaryOperator<Writer>> |
postProcessor
The option for specifying a post-processor class.
|
Unmapped |
skip
The option for skipping generation of methods that use unmapped types.
|
Class<? extends UnaryOperator<Writer>> |
typeVariableTransformer
The option for specifying a type variable transformer class.
|
public abstract String fileExtension
".java".public abstract StandardLocation outputLocation
fileExtension() is set to
a non-default value; .java files will always be generated in the
StandardLocation.SOURCE_OUTPUT location (which is also the default value for
this option).public abstract Unmapped skip
@Unmapped(false), i.e., no methods are skipped, even if they use
unmapped types.Unmapped typespublic abstract Ternary addAnnotations
@Generated). Defaults to Ternary.EITHER,
which is interpreted as true. The Ternary type is used to make it distinguishable
if a boolean option is set to a non-default value at the package level, but is set back to the
default value at annotation level. Using plain booleans, this scenario would not be
distinguishable.public abstract Class<? extends UnaryOperator<Writer>> postProcessor
public abstract Class<? extends UnaryOperator<Writer>> typeVariableTransformer
Copyright © 2024. All rights reserved.