]> source.dussan.org Git - javassist.git/commitdiff
Handle Annotation.annotationType() calls
authorkkhan <kkhan@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 18 Jul 2006 09:35:36 +0000 (09:35 +0000)
committerkkhan <kkhan@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 18 Jul 2006 09:35:36 +0000 (09:35 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@297 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/bytecode/annotation/AnnotationImpl.java

index 63d89f9cbcb1d0226b0b3cac47cdab58459cb4eb..be66df4f1cfef93ea9a5927097ec7a6b7ea95fb4 100644 (file)
@@ -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)