@ProviderFor(value=EclipseAnnotationHandler.class) public class HandleGetter extends EclipseAnnotationHandler<Getter>
lombok.Getter
annotation for eclipse.Modifier and Type | Field and Description |
---|---|
static java.util.Map<java.lang.String,char[][]> |
TYPE_MAP |
Constructor and Description |
---|
HandleGetter() |
Modifier and Type | Method and Description |
---|---|
org.eclipse.jdt.internal.compiler.ast.MethodDeclaration |
createGetter(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration parent,
EclipseNode fieldNode,
java.lang.String name,
int modifier,
org.eclipse.jdt.internal.compiler.ast.ASTNode source,
boolean lazy,
java.util.List<org.eclipse.jdt.internal.compiler.ast.Annotation> onMethod) |
void |
createGetterForField(AccessLevel level,
EclipseNode fieldNode,
EclipseNode errorNode,
org.eclipse.jdt.internal.compiler.ast.ASTNode source,
boolean whineIfExists,
boolean lazy,
java.util.List<org.eclipse.jdt.internal.compiler.ast.Annotation> onMethod) |
void |
createGetterForFields(AccessLevel level,
java.util.Collection<EclipseNode> fieldNodes,
EclipseNode errorNode,
org.eclipse.jdt.internal.compiler.ast.ASTNode source,
boolean whineIfExists,
boolean lazy,
java.util.List<org.eclipse.jdt.internal.compiler.ast.Annotation> onMethod) |
org.eclipse.jdt.internal.compiler.ast.Statement[] |
createLazyGetterBody(org.eclipse.jdt.internal.compiler.ast.ASTNode source,
EclipseNode fieldNode) |
org.eclipse.jdt.internal.compiler.ast.Statement[] |
createSimpleGetterBody(org.eclipse.jdt.internal.compiler.ast.ASTNode source,
EclipseNode fieldNode) |
boolean |
fieldQualifiesForGetterGeneration(EclipseNode field) |
static org.eclipse.jdt.internal.compiler.ast.Annotation[] |
findDelegatesAndMarkAsHandled(EclipseNode fieldNode) |
void |
generateGetterForField(EclipseNode fieldNode,
org.eclipse.jdt.internal.compiler.ast.ASTNode pos,
AccessLevel level,
boolean lazy)
Generates a getter on the stated field.
|
boolean |
generateGetterForType(EclipseNode typeNode,
EclipseNode pos,
AccessLevel level,
boolean checkForTypeLevelGetter) |
void |
handle(AnnotationValues<Getter> 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.
|
getAnnotationHandledByThisHandler, preHandle
public boolean generateGetterForType(EclipseNode typeNode, EclipseNode pos, AccessLevel level, boolean checkForTypeLevelGetter)
public boolean fieldQualifiesForGetterGeneration(EclipseNode field)
public void generateGetterForField(EclipseNode fieldNode, org.eclipse.jdt.internal.compiler.ast.ASTNode pos, AccessLevel level, boolean lazy)
HandleData
.
The difference between this call and the handle method is as follows:
If there is a lombok.Getter
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 getter 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<Getter> annotation, org.eclipse.jdt.internal.compiler.ast.Annotation ast, EclipseNode annotationNode)
EclipseAnnotationHandler
handle
in class EclipseAnnotationHandler<Getter>
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 createGetterForFields(AccessLevel level, java.util.Collection<EclipseNode> fieldNodes, EclipseNode errorNode, org.eclipse.jdt.internal.compiler.ast.ASTNode source, boolean whineIfExists, boolean lazy, java.util.List<org.eclipse.jdt.internal.compiler.ast.Annotation> onMethod)
public void createGetterForField(AccessLevel level, EclipseNode fieldNode, EclipseNode errorNode, org.eclipse.jdt.internal.compiler.ast.ASTNode source, boolean whineIfExists, boolean lazy, java.util.List<org.eclipse.jdt.internal.compiler.ast.Annotation> onMethod)
public static org.eclipse.jdt.internal.compiler.ast.Annotation[] findDelegatesAndMarkAsHandled(EclipseNode fieldNode)
public org.eclipse.jdt.internal.compiler.ast.MethodDeclaration createGetter(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration parent, EclipseNode fieldNode, java.lang.String name, int modifier, org.eclipse.jdt.internal.compiler.ast.ASTNode source, boolean lazy, java.util.List<org.eclipse.jdt.internal.compiler.ast.Annotation> onMethod)
public org.eclipse.jdt.internal.compiler.ast.Statement[] createSimpleGetterBody(org.eclipse.jdt.internal.compiler.ast.ASTNode source, EclipseNode fieldNode)
public org.eclipse.jdt.internal.compiler.ast.Statement[] createLazyGetterBody(org.eclipse.jdt.internal.compiler.ast.ASTNode source, EclipseNode fieldNode)
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.