From da847bf6bf5634044a7f2acc07c839aa4f090721 Mon Sep 17 00:00:00 2001 From: kkhan Date: Tue, 18 Jul 2006 09:35:36 +0000 Subject: [PATCH] Handle Annotation.annotationType() calls git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@297 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/bytecode/annotation/AnnotationImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/javassist/bytecode/annotation/AnnotationImpl.java b/src/main/javassist/bytecode/annotation/AnnotationImpl.java index 63d89f9c..be66df4f 100644 --- a/src/main/javassist/bytecode/annotation/AnnotationImpl.java +++ b/src/main/javassist/bytecode/annotation/AnnotationImpl.java @@ -85,6 +85,11 @@ public class AnnotationImpl implements InvocationHandler { else if ("hashCode".equals(name)) return new Integer(hashCode()); } + else if ("annotationType".equals(name) && method.getParameterTypes().length == 0) + { + return classLoader.loadClass(getTypeName()); + } + MemberValue mv = annotation.getMemberValue(name); if (mv == null) -- 2.39.5