@ProviderFor(value=JavacAnnotationHandler.class) public class HandleWither extends JavacAnnotationHandler<Wither>
lombok.experimental.Wither
annotation for javac.Constructor and Description |
---|
HandleWither() |
Modifier and Type | Method and Description |
---|---|
JCMethodDecl |
createWither(long access,
JavacNode field,
lombok.javac.JavacTreeMaker maker,
JavacNode source,
<any> onMethod,
<any> onParam) |
void |
createWitherForField(AccessLevel level,
JavacNode fieldNode,
JavacNode source,
boolean whineIfExists,
<any> onMethod,
<any> onParam) |
void |
createWitherForFields(AccessLevel level,
java.util.Collection<JavacNode> fieldNodes,
JavacNode errorNode,
boolean whineIfExists,
<any> onMethod,
<any> onParam) |
void |
generateWitherForField(JavacNode fieldNode,
DiagnosticPosition pos,
AccessLevel level)
Generates a wither on the stated field.
|
void |
generateWitherForType(JavacNode typeNode,
JavacNode errorNode,
AccessLevel level,
boolean checkForTypeLevelWither) |
void |
handle(AnnotationValues<Wither> annotation,
JCAnnotation ast,
JavacNode annotationNode)
Called when an annotation is found that is likely to match the annotation you're interested in.
|
getAnnotationHandledByThisHandler
public void generateWitherForType(JavacNode typeNode, JavacNode errorNode, AccessLevel level, boolean checkForTypeLevelWither)
public void generateWitherForField(JavacNode fieldNode, DiagnosticPosition pos, AccessLevel level)
HandleValue
.
The difference between this call and the handle method is as follows:
If there is a lombok.experimental.Wither
annotation on the field, it is used and the
same rules apply (e.g. warning if the method already exists, stated access level applies).
If not, the wither is still generated if it isn't already there, though there will not
be a warning if its already there. The default access level is used.fieldNode
- The node representing the field you want a wither for.pos
- The node responsible for generating the wither (the @Value
or @Wither
annotation).public void handle(AnnotationValues<Wither> annotation, JCAnnotation ast, JavacNode annotationNode)
JavacAnnotationHandler
handle
in class JavacAnnotationHandler<Wither>
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 void createWitherForFields(AccessLevel level, java.util.Collection<JavacNode> fieldNodes, JavacNode errorNode, boolean whineIfExists, <any> onMethod, <any> onParam)
public void createWitherForField(AccessLevel level, JavacNode fieldNode, JavacNode source, boolean whineIfExists, <any> onMethod, <any> onParam)
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.