mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 14:16:11 +00:00
Just renamed some parameters to more sensical names.
This commit is contained in:
1 parent
981e7db354
commit
5bdfa539f2
2 files changed
+6
-6
No files matched your search
@@ -7,5 +7,5 @@ import lombok.core.AnnotationValues;
|
||||
import com.sun.tools.javac.tree.JCTree.JCAnnotation;
|
||||
|
||||
public interface JavacAnnotationHandler<T extends Annotation> {
|
||||
void handle(AnnotationValues<T> annotation, JCAnnotation ast, JavacAST.Node annotedElement);
|
||||
void handle(AnnotationValues<T> annotation, JCAnnotation ast, JavacAST.Node annotationNode);
|
||||
}
|
||||
@@ -25,19 +25,19 @@ import com.sun.tools.javac.util.Name;
|
||||
|
||||
@ProviderFor(JavacAnnotationHandler.class)
|
||||
public class HandleGetter implements JavacAnnotationHandler<Getter> {
|
||||
@Override public void handle(AnnotationValues<Getter> annotation, JCAnnotation ast, JavacAST.Node node) {
|
||||
if ( node.up().getKind() != Kind.FIELD ) {
|
||||
node.addError("@Getter is only supported on a field.");
|
||||
@Override public void handle(AnnotationValues<Getter> annotation, JCAnnotation ast, JavacAST.Node annotationNode) {
|
||||
if ( annotationNode.up().getKind() != Kind.FIELD ) {
|
||||
annotationNode.addError("@Getter is only supported on a field.");
|
||||
return;
|
||||
}
|
||||
|
||||
Getter getter = annotation.getInstance();
|
||||
|
||||
JCClassDecl javacClassTree = (JCClassDecl) node.up().up().get();
|
||||
JCClassDecl javacClassTree = (JCClassDecl) annotationNode.up().up().get();
|
||||
|
||||
int access = toJavacModifier(getter.value());
|
||||
|
||||
MethodTree getterMethod = createGetter(access, node.up(), node.getTreeMaker());
|
||||
MethodTree getterMethod = createGetter(access, annotationNode.up(), annotationNode.getTreeMaker());
|
||||
javacClassTree.defs = javacClassTree.defs.append((JCTree)getterMethod);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user