aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-04-02 22:56:47 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-04-03 00:04:31 +0200
commitc900526ebf620dcf4f92e7d6c8f7d529900ee666 (patch)
treeecc3c5f1803f41b361b66ce041eff651f1aaf740 /src/core/lombok/javac/handlers
parentb041b355d64cf0c3ec17f360a1cee27a8fe0ea3f (diff)
downloadlombok-c900526ebf620dcf4f92e7d6c8f7d529900ee666.tar.gz
lombok-c900526ebf620dcf4f92e7d6c8f7d529900ee666.tar.bz2
lombok-c900526ebf620dcf4f92e7d6c8f7d529900ee666.zip
Philipp Eichhorn's patch to use marker annotations instead of boolean-returning interface methods for eclipse's postdiet and javac's isResolutionBased.
Diffstat (limited to 'src/core/lombok/javac/handlers')
-rw-r--r--src/core/lombok/javac/handlers/HandleDelegate.java6
-rw-r--r--src/core/lombok/javac/handlers/HandleVal.java6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/core/lombok/javac/handlers/HandleDelegate.java b/src/core/lombok/javac/handlers/HandleDelegate.java
index 18817d49..50a2f1bb 100644
--- a/src/core/lombok/javac/handlers/HandleDelegate.java
+++ b/src/core/lombok/javac/handlers/HandleDelegate.java
@@ -47,6 +47,7 @@ import lombok.javac.FindTypeVarScanner;
import lombok.javac.JavacAnnotationHandler;
import lombok.javac.JavacNode;
import lombok.javac.JavacResolution;
+import lombok.javac.ResolutionBased;
import lombok.javac.JavacResolution.TypeNotConvertibleException;
import org.mangosdk.spi.ProviderFor;
@@ -74,11 +75,8 @@ import com.sun.tools.javac.util.ListBuffer;
import com.sun.tools.javac.util.Name;
@ProviderFor(JavacAnnotationHandler.class)
+@ResolutionBased
public class HandleDelegate extends JavacAnnotationHandler<Delegate> {
- @Override public boolean isResolutionBased() {
- return true;
- }
-
private static final List<String> METHODS_IN_OBJECT = Collections.unmodifiableList(Arrays.asList(
"hashCode()",
"canEqual(java.lang.Object)", //Not in j.l.Object, but it goes with hashCode and equals so if we ignore those two, we should ignore this one.
diff --git a/src/core/lombok/javac/handlers/HandleVal.java b/src/core/lombok/javac/handlers/HandleVal.java
index 4feaa3ac..52d2ed13 100644
--- a/src/core/lombok/javac/handlers/HandleVal.java
+++ b/src/core/lombok/javac/handlers/HandleVal.java
@@ -28,6 +28,7 @@ import lombok.javac.JavacASTAdapter;
import lombok.javac.JavacASTVisitor;
import lombok.javac.JavacNode;
import lombok.javac.JavacResolution;
+import lombok.javac.ResolutionBased;
import org.mangosdk.spi.ProviderFor;
@@ -43,11 +44,8 @@ import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
import com.sun.tools.javac.util.List;
@ProviderFor(JavacASTVisitor.class)
+@ResolutionBased
public class HandleVal extends JavacASTAdapter {
- @Override public boolean isResolutionBased() {
- return true;
- }
-
@Override public void visitLocal(JavacNode localNode, JCVariableDecl local) {
if (local.vartype == null || (!local.vartype.toString().equals("val") && !local.vartype.toString().equals("lombok.val"))) return;