@ProviderFor(value=EclipseAnnotationHandler.class) public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndHashCode>
EqualsAndHashCode
annotation for eclipse.Modifier and Type | Field and Description |
---|---|
static Set<String> |
BUILT_IN_TYPES |
Constructor and Description |
---|
HandleEqualsAndHashCode() |
Modifier and Type | Method and Description |
---|---|
void |
checkForBogusFieldNames(EclipseNode type,
AnnotationValues<EqualsAndHashCode> annotation) |
MethodDeclaration |
createCanEqual(EclipseNode type,
ASTNode source,
List<Annotation> onParam) |
MethodDeclaration |
createEquals(EclipseNode type,
Collection<EclipseNode> fields,
boolean callSuper,
ASTNode source,
EclipseHandlerUtil.FieldAccess fieldAccess,
boolean needsCanEqual,
List<Annotation> onParam) |
MethodDeclaration |
createHashCode(EclipseNode type,
Collection<EclipseNode> fields,
boolean callSuper,
ASTNode source,
EclipseHandlerUtil.FieldAccess fieldAccess) |
LocalDeclaration |
createLocalDeclaration(ASTNode source,
char[] dollarFieldName,
TypeReference type,
Expression initializer) |
Expression |
createResultCalculation(ASTNode source,
Expression ex) |
TypeReference |
createTypeReference(EclipseNode type,
long p) |
IfStatement |
generateCompareFloatOrDouble(Expression thisRef,
Expression otherRef,
char[] floatOrDouble,
ASTNode source) |
void |
generateEqualsAndHashCodeForType(EclipseNode typeNode,
EclipseNode errorNode) |
void |
generateMethods(EclipseNode typeNode,
EclipseNode errorNode,
List<String> excludes,
List<String> includes,
Boolean callSuper,
boolean whineIfExists,
EclipseHandlerUtil.FieldAccess fieldAccess,
List<Annotation> onParam) |
NameReference |
generateQualifiedNameRef(ASTNode source,
char[]... varNames) |
TypeReference |
generateQualifiedTypeRef(ASTNode source,
char[]... varNames) |
void |
handle(AnnotationValues<EqualsAndHashCode> annotation,
Annotation ast,
EclipseNode annotationNode)
Called when an annotation is found that is likely to match the annotation you're interested in.
|
Expression |
longToIntForHashCode(Expression ref1,
Expression ref2,
ASTNode source)
Give 2 clones!
|
getAnnotationHandledByThisHandler, preHandle
public void checkForBogusFieldNames(EclipseNode type, AnnotationValues<EqualsAndHashCode> annotation)
public void generateEqualsAndHashCodeForType(EclipseNode typeNode, EclipseNode errorNode)
public void handle(AnnotationValues<EqualsAndHashCode> annotation, Annotation ast, EclipseNode annotationNode)
EclipseAnnotationHandler
handle
in class EclipseAnnotationHandler<EqualsAndHashCode>
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 generateMethods(EclipseNode typeNode, EclipseNode errorNode, List<String> excludes, List<String> includes, Boolean callSuper, boolean whineIfExists, EclipseHandlerUtil.FieldAccess fieldAccess, List<Annotation> onParam)
public MethodDeclaration createHashCode(EclipseNode type, Collection<EclipseNode> fields, boolean callSuper, ASTNode source, EclipseHandlerUtil.FieldAccess fieldAccess)
public LocalDeclaration createLocalDeclaration(ASTNode source, char[] dollarFieldName, TypeReference type, Expression initializer)
public Expression createResultCalculation(ASTNode source, Expression ex)
public TypeReference createTypeReference(EclipseNode type, long p)
public MethodDeclaration createEquals(EclipseNode type, Collection<EclipseNode> fields, boolean callSuper, ASTNode source, EclipseHandlerUtil.FieldAccess fieldAccess, boolean needsCanEqual, List<Annotation> onParam)
public MethodDeclaration createCanEqual(EclipseNode type, ASTNode source, List<Annotation> onParam)
public IfStatement generateCompareFloatOrDouble(Expression thisRef, Expression otherRef, char[] floatOrDouble, ASTNode source)
public Expression longToIntForHashCode(Expression ref1, Expression ref2, ASTNode source)
public NameReference generateQualifiedNameRef(ASTNode source, char[]... varNames)
public TypeReference generateQualifiedTypeRef(ASTNode source, char[]... varNames)
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.