public abstract class AnnotationManager extends Object
manageAnnotation(Element, String)) and/or customize
the values of their properties.JSweetContext#addAnnotationManager(AnnotationAdapter)| Modifier and Type | Class and Description |
|---|---|
static class |
AnnotationManager.Action
The action to be returned by the manager to add or remove annotations.
|
| Constructor and Description |
|---|
AnnotationManager() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getAnnotationValue(Element element,
String annotationType,
String propertyName,
Class<T> propertyClass,
T defaultValue)
Gets the given annotation property value.
|
abstract AnnotationManager.Action |
manageAnnotation(Element element,
String annotationType)
Manages the given annotation type, by returning one of the possible
actions (see
AnnotationManager.Action). |
public abstract AnnotationManager.Action manageAnnotation(Element element, String annotationType)
AnnotationManager.Action).element - the AST element where the annotation shall be managedannotationType - the managed annotation type (fully qualified name)public <T> T getAnnotationValue(Element element, String annotationType, String propertyName, Class<T> propertyClass, T defaultValue)
This method has to be overridden when annotations containing properties
are being added by this manager with the
manageAnnotation(Element, String) method, or if
this manager wants to tune the values of existing annotations (less
common scenario).
This method returns null by default, which means that it leaves the job to other managers or to the default behavior.
element - the AST element on which the annotation is definedannotationType - the annotation type (fully qualified name)propertyName - the annotation's property name (if null, the value property is
looked up)propertyClass - the annotation's property classdefaultValue - the default value to be returned if not found