diff options
author | Taiki Sugawara <buzz.taiki@gmail.com> | 2012-02-25 00:11:57 +0900 |
---|---|---|
committer | Taiki Sugawara <buzz.taiki@gmail.com> | 2012-02-25 00:11:57 +0900 |
commit | 73dab3e96613521b8769b29e6a3c7e4ee5f26911 (patch) | |
tree | 308cbdb55323266ccb3ff3d78fab4cbf699da808 /src/eclipseAgent/lombok/eclipse/agent | |
parent | 07996af82a1fdb984659c758ad4530840789a2a1 (diff) | |
download | lombok-73dab3e96613521b8769b29e6a3c7e4ee5f26911.tar.gz lombok-73dab3e96613521b8769b29e6a3c7e4ee5f26911.tar.bz2 lombok-73dab3e96613521b8769b29e6a3c7e4ee5f26911.zip |
Handle deprecated by ordinary usage.
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java index 6977df2b..acf1589d 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java @@ -21,8 +21,8 @@ */ package lombok.eclipse.agent; -import static lombok.eclipse.handlers.EclipseHandlerUtil.*; import static lombok.eclipse.Eclipse.*; +import static lombok.eclipse.handlers.EclipseHandlerUtil.*; import java.lang.reflect.Method; import java.util.ArrayList; @@ -65,7 +65,6 @@ import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.eclipse.jdt.internal.compiler.ast.TypeParameter; import org.eclipse.jdt.internal.compiler.ast.TypeReference; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; -import org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding; import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding; import org.eclipse.jdt.internal.compiler.lookup.BaseTypeBinding; import org.eclipse.jdt.internal.compiler.lookup.Binding; @@ -416,19 +415,6 @@ public class PatchDelegate { } } - private static boolean hasDeprecatedAnnotation(MethodBinding binding) { - AnnotationBinding[] annotations = binding.getAnnotations(); - if (annotations != null) for (AnnotationBinding ann : annotations) { - ReferenceBinding annType = ann.getAnnotationType(); - char[] pkg = annType.qualifiedPackageName(); - char[] src = annType.qualifiedSourceName(); - - if (charArrayEquals("java.lang", pkg) && charArrayEquals("Deprecated", src)) return true; - } - - return false; - } - public static void checkConflictOfTypeVarNames(BindingTuple binding, EclipseNode typeNode) throws CantMakeDelegates { TypeVariableBinding[] typeVars = binding.parameterized.typeVariables(); if (typeVars == null || typeVars.length == 0) return; @@ -581,7 +567,7 @@ public class PatchDelegate { method.modifiers = ClassFileConstants.AccPublic; method.returnType = makeType(binding.returnType, source, false); - boolean isDeprecated = hasDeprecatedAnnotation(binding) || binding.isDeprecated(); + boolean isDeprecated = binding.isDeprecated(); method.selector = binding.selector; |