diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-12-19 20:10:39 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-12-19 20:10:39 +0100 |
commit | b25a644f50e10540b7cb69189430d932a8750aec (patch) | |
tree | 386981e8c868e828e41f1ae384403778c7ddf6b9 /src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java | |
parent | 232d5edc355043a8616f869da670ac2c4376032e (diff) | |
parent | ae87a26456245f19d97f8852ea21556cd78e97ef (diff) | |
download | lombok-b25a644f50e10540b7cb69189430d932a8750aec.tar.gz lombok-b25a644f50e10540b7cb69189430d932a8750aec.tar.bz2 lombok-b25a644f50e10540b7cb69189430d932a8750aec.zip |
Merge branch 'typeLibrary'
Diffstat (limited to 'src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java')
-rw-r--r-- | src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java index 5130c7de..c6d7eb41 100644 --- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java +++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java @@ -30,7 +30,6 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -46,7 +45,6 @@ import lombok.core.AnnotationValues.AnnotationValue; import lombok.eclipse.EclipseAST; import lombok.eclipse.EclipseNode; import lombok.core.TransformationsUtil; -import lombok.core.TypeLibrary; import lombok.core.TypeResolver; import org.eclipse.core.runtime.ILog; @@ -260,16 +258,9 @@ public class EclipseHandlerUtil { if (!lastPartA.equals(lastPartB)) return false; String typeName = toQualifiedName(typeRef.getTypeName()); - TypeLibrary library = new TypeLibrary(); - library.addType(type.getName()); - TypeResolver resolver = new TypeResolver(library, node.getPackageDeclaration(), node.getImportStatements()); - Collection<String> typeMatches = resolver.findTypeMatches(node, typeName); + TypeResolver resolver = new TypeResolver(node.getPackageDeclaration(), node.getImportStatements()); + return resolver.typeMatches(node, type.getName(), typeName); - for (String match : typeMatches) { - if (match.equals(type.getName())) return true; - } - - return false; } public static Annotation copyAnnotation(Annotation annotation, ASTNode source) { |