@ProviderFor(value=EclipseAnnotationHandler.class) public class HandleSetter extends EclipseAnnotationHandler<Setter>
lombok.Setter
annotation for eclipse.Constructor and Description |
---|
HandleSetter() |
Modifier and Type | Method and Description |
---|---|
void |
createSetterForField(AccessLevel level,
EclipseNode fieldNode,
EclipseNode sourceNode,
boolean whineIfExists,
List<Annotation> onMethod,
List<Annotation> onParam) |
void |
createSetterForFields(AccessLevel level,
Collection<EclipseNode> fieldNodes,
EclipseNode sourceNode,
boolean whineIfExists,
List<Annotation> onMethod,
List<Annotation> onParam) |
void |
generateSetterForField(EclipseNode fieldNode,
EclipseNode sourceNode,
AccessLevel level)
Generates a setter on the stated field.
|
boolean |
generateSetterForType(EclipseNode typeNode,
EclipseNode pos,
AccessLevel level,
boolean checkForTypeLevelSetter) |
void |
handle(AnnotationValues<Setter> 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 generateSetterForType(EclipseNode typeNode, EclipseNode pos, AccessLevel level, boolean checkForTypeLevelSetter)
public void generateSetterForField(EclipseNode fieldNode, EclipseNode sourceNode, AccessLevel level)
HandleData
.
The difference between this call and the handle method is as follows:
If there is a lombok.Setter
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 setter 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<Setter> annotation, Annotation ast, EclipseNode annotationNode)
EclipseAnnotationHandler
handle
in class EclipseAnnotationHandler<Setter>
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 createSetterForFields(AccessLevel level, Collection<EclipseNode> fieldNodes, EclipseNode sourceNode, boolean whineIfExists, List<Annotation> onMethod, List<Annotation> onParam)
public void createSetterForField(AccessLevel level, EclipseNode fieldNode, EclipseNode sourceNode, boolean whineIfExists, List<Annotation> onMethod, List<Annotation> onParam)
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.