]> source.dussan.org Git - javassist.git/commitdiff
Allow for retrieval of the real type name of the annotation.
authoradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Sun, 5 Feb 2006 13:53:06 +0000 (13:53 +0000)
committeradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Sun, 5 Feb 2006 13:53:06 +0000 (13:53 +0000)
We need this to emulate isAnnotationPresent(), etc.

git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@241 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

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

index 91e8989b7bcb5c3e0f0dfa9244341f11e3e1c308..59f83e0d0c8cd6088fbbbd0bdd3cb7fe13223b2a 100644 (file)
@@ -24,7 +24,7 @@ import javassist.bytecode.MethodInfo;
 
 import java.lang.reflect.*;
 
-class AnnotationImpl implements InvocationHandler {
+public class AnnotationImpl implements InvocationHandler {
     private Annotation annotation;
     private ClassPool pool;
     private ClassLoader classLoader;
@@ -50,6 +50,11 @@ class AnnotationImpl implements InvocationHandler {
         classLoader = loader;
     }
 
+    public String getTypeName()
+    {
+       return annotation.getTypeName();
+    }
+    
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable
     {