public abstract class JavacAnnotationHandler<T extends java.lang.annotation.Annotation>
extends java.lang.Object
public class HandleGetter extends JavacAnnotationHandler<Getter>
Because this generics parameter is inspected to figure out which class you're interested in.
You also need to register yourself via SPI discovery as being an implementation of JavacAnnotationHandler
.Constructor and Description |
---|
JavacAnnotationHandler() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<T> |
getAnnotationHandledByThisHandler()
This handler is a handler for the given annotation; you don't normally need to override this class
as the annotation type is extracted from your
extends EclipseAnnotationHandler<AnnotationTypeHere>
signature. |
abstract void |
handle(AnnotationValues<T> annotation,
JCAnnotation ast,
JavacNode annotationNode)
Called when an annotation is found that is likely to match the annotation you're interested in.
|
public abstract void handle(AnnotationValues<T> annotation, JCAnnotation ast, JavacNode annotationNode)
annotation
- The actual annotation - use this object to retrieve the annotation parameters.ast
- The javac AST node representing the annotation.annotationNode
- The Lombok AST wrapper around the 'ast' parameter. You can use this object
to travel back up the chain (something javac AST can't do) to the parent of the annotation, as well
as access useful methods such as generating warnings or errors focused on the annotation.public java.lang.Class<T> getAnnotationHandledByThisHandler()
extends EclipseAnnotationHandler<AnnotationTypeHere>
signature.Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.