Annotation Type Options


@Target(PACKAGE)
@Retention(RUNTIME)
public @interface Options
The @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.
Author:
Mirko Raner
  • Element Details

    • fileExtension

      String fileExtension
      The file extension to be used for generated files. Default value is ".java".
      Returns:
      the file extension
      Default:
      ".java"
    • outputLocation

      StandardLocation outputLocation
      The output location for generated files with a custom file extension. NOTE: this setting only has an effect when 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).
      Returns:
      the output location
      Default:
      SOURCE_OUTPUT
    • skip

      Unmapped skip
      The option for skipping generation of methods that use unmapped types. The default value is @Unmapped(false), i.e., no methods are skipped, even if they use unmapped types.
      Returns:
      the option for skipping methods using Unmapped types
      Default:
      @pro.projo.interfaces.annotation.Unmapped(false)
    • addAnnotations

      Ternary addAnnotations
      The option for adding annotations (such as @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.
      Returns:
      whether annotations should be added to the generated code
      Default:
      EITHER
    • postProcessor

      Class<? extends UnaryOperator<Writer>> postProcessor
      The option for specifying a post-processor class.
      Returns:
      the post-processor class
      Default:
      pro.projo.interfaces.annotation.postprocessor.IdentityPostProcessor.class
    • typeVariableTransformer

      Class<? extends UnaryOperator<Writer>> typeVariableTransformer
      The option for specifying a type variable transformer class.
      Returns:
      the type variable transformer
      Default:
      pro.projo.interfaces.annotation.postprocessor.IdentityPostProcessor.class