@Target({PACKAGE,TYPE})
@Retention(SOURCE)
@Repeatable(GeneratePrisms.class)
public @interface 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
Modifier and TypeRequired ElementDescriptionClass<? extends Annotation>
The annotation to generate a prism for. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe 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.
-
Element Details
-
value
Class<? extends Annotation> valueThe annotation to generate a prism for.- Returns:
- annotation class.
-
-
-
name
The name of the generated prism class. Defaults to XXPrism where XX is the simple name of the annotation specified by value().- Returns:
- The name of the generated prism class.
- Default:
- ""
-
publicAccess
boolean publicAccessSet 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.- Returns:
- if the prism is to be made public
- Default:
- false
-