public abstract class EclipseAnnotationHandler<T extends Annotation> extends Object
public class HandleGetter extends EclipseAnnotationHandler<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 EclipseAnnotationHandler
.Constructor and Description |
---|
EclipseAnnotationHandler() |
Modifier and Type | Method and Description |
---|---|
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,
org.eclipse.jdt.internal.compiler.ast.Annotation ast,
EclipseNode annotationNode)
Called when an annotation is found that is likely to match the annotation you're interested in.
|
void |
preHandle(AnnotationValues<T> annotation,
org.eclipse.jdt.internal.compiler.ast.Annotation ast,
EclipseNode annotationNode)
Called when you want to defer until post diet, and we're still in pre-diet.
|
public abstract void handle(AnnotationValues<T> annotation, org.eclipse.jdt.internal.compiler.ast.Annotation ast, EclipseNode annotationNode)
annotation
- The actual annotation - use this object to retrieve the annotation parameters.ast
- The Eclipse 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 void preHandle(AnnotationValues<T> annotation, org.eclipse.jdt.internal.compiler.ast.Annotation ast, EclipseNode annotationNode)
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.