aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/javac/handlers/HandleGetter.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-10-18 17:37:03 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-10-18 17:37:03 +0200
commit4da08ce3ccdd94f48856bd77b3dff50a77c150b1 (patch)
tree20f61c2a5eb73a0fa6cf47db744bb932c1eff28e /src/lombok/javac/handlers/HandleGetter.java
parentbd3966af0e5d2ce948bf22dcb99227e0df5c6f13 (diff)
downloadlombok-4da08ce3ccdd94f48856bd77b3dff50a77c150b1.tar.gz
lombok-4da08ce3ccdd94f48856bd77b3dff50a77c150b1.tar.bz2
lombok-4da08ce3ccdd94f48856bd77b3dff50a77c150b1.zip
Removed some warnings.
Diffstat (limited to 'src/lombok/javac/handlers/HandleGetter.java')
-rw-r--r--src/lombok/javac/handlers/HandleGetter.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lombok/javac/handlers/HandleGetter.java b/src/lombok/javac/handlers/HandleGetter.java
index 49f732d8..064454d9 100644
--- a/src/lombok/javac/handlers/HandleGetter.java
+++ b/src/lombok/javac/handlers/HandleGetter.java
@@ -62,6 +62,9 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> {
* 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.
+ *
+ * @param fieldNode The node representing the field you want a getter for.
+ * @param pos The node responsible for generating the getter (the {@code @Data} or {@code @Getter} annotation).
*/
public void generateGetterForField(JavacNode fieldNode, DiagnosticPosition pos) {
for (JavacNode child : fieldNode.down()) {
@@ -73,7 +76,7 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> {
}
}
- createGetterForField(AccessLevel.PUBLIC, fieldNode, fieldNode, pos, false);
+ createGetterForField(AccessLevel.PUBLIC, fieldNode, fieldNode, false);
}
@Override public boolean handle(AnnotationValues<Getter> annotation, JCAnnotation ast, JavacNode annotationNode) {
@@ -81,11 +84,11 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> {
AccessLevel level = annotation.getInstance().value();
if (level == AccessLevel.NONE) return true;
- return createGetterForField(level, fieldNode, annotationNode, annotationNode.get(), true);
+ return createGetterForField(level, fieldNode, annotationNode, true);
}
private boolean createGetterForField(AccessLevel level,
- JavacNode fieldNode, JavacNode errorNode, DiagnosticPosition pos, boolean whineIfExists) {
+ JavacNode fieldNode, JavacNode errorNode, boolean whineIfExists) {
if (fieldNode.getKind() != Kind.FIELD) {
errorNode.addError("@Getter is only supported on a field.");
return true;