aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-11-22 23:01:21 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-11-25 12:47:07 +0100
commitc340c9c24f45b7007ed04fb5ce9e1f1819e8e0ba (patch)
tree784fcbc3ca2ec78f9afc42385308b3b6c1018210 /src/eclipseAgent
parent4ded143defebd49610e74443e2d6d813d57fd11b (diff)
downloadlombok-c340c9c24f45b7007ed04fb5ce9e1f1819e8e0ba.tar.gz
lombok-c340c9c24f45b7007ed04fb5ce9e1f1819e8e0ba.tar.bz2
lombok-c340c9c24f45b7007ed04fb5ce9e1f1819e8e0ba.zip
@Delegate, at least without value=, seems to work great in javac now!
Diffstat (limited to 'src/eclipseAgent')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java
index 8f7213f0..c7da502e 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java
@@ -72,6 +72,7 @@ import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.jdt.internal.compiler.lookup.WildcardBinding;
public class PatchDelegate {
static void addPatches(ScriptManager sm, boolean ecj) {
@@ -287,7 +288,7 @@ public class PatchDelegate {
addAllMethodBindings(list, binding, banList);
}
- private static void addAllMethodBindings(List<MethodBinding> list, TypeBinding binding, Collection<String> banList) {
+ private static void addAllMethodBindings(List<MethodBinding> list, TypeBinding binding, Set<String> banList) {
if (binding == null) return;
if (binding instanceof MemberTypeBinding) {
ClassScope cs = ((SourceTypeBinding)binding).scope;
@@ -310,9 +311,8 @@ public class PatchDelegate {
if (mb.isDefaultAbstract()) continue;
if (!mb.isPublic()) continue;
if (mb.isSynthetic()) continue;
- if (banList.contains(sig)) continue;
+ if (!banList.add(sig)) continue; // If add returns false, it was already in there.
list.add(mb);
- banList.add(sig);
}
addAllMethodBindings(list, rb.superclass(), banList);
ReferenceBinding[] interfaces = rb.superInterfaces();
@@ -344,14 +344,14 @@ public class PatchDelegate {
if (binding.parameters != null) for (TypeBinding param : binding.parameters) {
if (!first) signature.append(", ");
first = false;
- signature.append(simpleTypeBindingToString(param));
+ signature.append(typeBindingToSignature(param));
}
signature.append(")");
return signature.toString();
}
- private static String simpleTypeBindingToString(TypeBinding binding) {
+ private static String typeBindingToSignature(TypeBinding binding) {
binding = binding.erasure();
if (binding != null && binding.isBaseType()) {
return new String (binding.sourceName());
@@ -361,7 +361,7 @@ public class PatchDelegate {
return pkg.isEmpty() ? qsn : (pkg + "." + qsn);
} else if (binding instanceof ArrayBinding) {
StringBuilder out = new StringBuilder();
- out.append(simpleTypeBindingToString(binding.leafComponentType()));
+ out.append(typeBindingToSignature(binding.leafComponentType()));
for (int i = 0; i < binding.dimensions(); i++) out.append("[]");
return out.toString();
}