@ProviderFor(value=EclipseAnnotationHandler.class) public class HandleWither extends EclipseAnnotationHandler<Wither>
Constructor and Description |
---|
HandleWither() |
Modifier and Type | Method and Description |
---|---|
MethodDeclaration |
createWither(TypeDeclaration parent,
EclipseNode fieldNode,
java.lang.String name,
int modifier,
EclipseNode sourceNode,
java.util.List<Annotation> onMethod,
java.util.List<Annotation> onParam) |
void |
createWitherForField(AccessLevel level,
EclipseNode fieldNode,
EclipseNode sourceNode,
boolean whineIfExists,
java.util.List<Annotation> onMethod,
java.util.List<Annotation> onParam) |
void |
createWitherForFields(AccessLevel level,
java.util.Collection<EclipseNode> fieldNodes,
EclipseNode sourceNode,
boolean whineIfExists,
java.util.List<Annotation> onMethod,
java.util.List<Annotation> onParam) |
void |
generateWitherForField(EclipseNode fieldNode,
EclipseNode sourceNode,
AccessLevel level)
Generates a wither on the stated field.
|
boolean |
generateWitherForType(EclipseNode typeNode,
EclipseNode pos,
AccessLevel level,
boolean checkForTypeLevelWither) |
void |
handle(AnnotationValues<Wither> annotation,
Annotation ast,
EclipseNode annotationNode)
Called when an annotation is found that is likely to match the annotation you're interested in.
|
getAnnotationHandledByThisHandler, preHandle
public boolean generateWitherForType(EclipseNode typeNode, EclipseNode pos, AccessLevel level, boolean checkForTypeLevelWither)
public void generateWitherForField(EclipseNode fieldNode, EclipseNode sourceNode, 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.public void handle(AnnotationValues<Wither> annotation, Annotation ast, EclipseNode annotationNode)
EclipseAnnotationHandler
handle
in class EclipseAnnotationHandler<Wither>
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 createWitherForFields(AccessLevel level, java.util.Collection<EclipseNode> fieldNodes, EclipseNode sourceNode, boolean whineIfExists, java.util.List<Annotation> onMethod, java.util.List<Annotation> onParam)
public void createWitherForField(AccessLevel level, EclipseNode fieldNode, EclipseNode sourceNode, boolean whineIfExists, java.util.List<Annotation> onMethod, java.util.List<Annotation> onParam)
public MethodDeclaration createWither(TypeDeclaration parent, EclipseNode fieldNode, java.lang.String name, int modifier, EclipseNode sourceNode, java.util.List<Annotation> onMethod, java.util.List<Annotation> onParam)
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.