aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok')
-rw-r--r--src/core/lombok/javac/handlers/HandleDelegate.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/HandleDelegate.java b/src/core/lombok/javac/handlers/HandleDelegate.java
index 9eca23db..18817d49 100644
--- a/src/core/lombok/javac/handlers/HandleDelegate.java
+++ b/src/core/lombok/javac/handlers/HandleDelegate.java
@@ -22,6 +22,7 @@
package lombok.javac.handlers;
import static lombok.javac.handlers.JavacHandlerUtil.*;
+import static com.sun.tools.javac.code.Flags.*;
import java.util.ArrayList;
import java.util.Arrays;
@@ -288,7 +289,13 @@ public class HandleDelegate extends JavacAnnotationHandler<Delegate> {
for (TypeMirror param : sig.type.getTypeVariables()) {
Name name = ((TypeVar) param).tsym.name;
- typeParams.append(maker.TypeParameter(name, maker.Types(types.getBounds((TypeVar) param))));
+
+ ListBuffer<JCExpression> bounds = types.getBounds((TypeVar) param).isEmpty() ? null : new ListBuffer<JCExpression>();
+ for (Type type : types.getBounds((TypeVar) param)) {
+ bounds.append(JavacResolution.typeToJCTree(type, annotation.getAst(), true));
+ }
+
+ typeParams.append(maker.TypeParameter(name, bounds.toList()));
typeArgs.append(maker.Ident(name));
}
@@ -329,7 +336,7 @@ public class HandleDelegate extends JavacAnnotationHandler<Delegate> {
ExecutableType methodType = (ExecutableType) types.asMemberOf(ct, member);
String sig = printSig(methodType, member.name, types);
if (!banList.add(sig)) continue; //If add returns false, it was already in there
- boolean isDeprecated = exElem.getAnnotation(Deprecated.class) != null;
+ boolean isDeprecated = (member.flags() & DEPRECATED) != 0;
signatures.add(new MethodSig(member.name, methodType, isDeprecated, exElem));
}