Annotation Type GeneratePrism


Generates a Prism for the specified annotation, in the same package as the target.

If multiple @Prism annotations specifying the same value() (and name()) are present within one package, only one Prism will be generated and no error will be raised.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Annotation>
    The annotation to generate a prism for.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the generated prism class.
    boolean
    Set to true for the prism to have public access, otherwise the generated prism and its members will be package visible.
    Set the class the generated Prism class will extend.
    Class<?>[]
    Set the interfaces the generated Prism class will implement.
  • Element Details

    • value

      Class<? extends Annotation> value
      The annotation to generate a prism for.
    • name

      String name
      The name of the generated prism class. Defaults to XXPrism where XX is the simple name of the annotation specified by value().
      Default:
      ""
    • publicAccess

      boolean publicAccess
      Set to true for the prism to have public access, otherwise the generated prism and its members will be package visible. The default is sufficient if the prism is generated in the same package as the AnnotationProcessor which uses them.
      Default:
      false
    • superClass

      Class<?> superClass
      Set the class the generated Prism class will extend. Useful for adding shared functionality for multiple Prisms.
      Default:
      java.lang.Void.class
    • superInterfaces

      Class<?>[] superInterfaces
      Set the interfaces the generated Prism class will implement. Useful for grouping multiple similar annotations. (e.g. You could have a common interface for Jakarta/Javax versions of an annotation)
      Default:
      {}