summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-02-05 13:53:06 +0000
committeradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-02-05 13:53:06 +0000
commit0f1701d237160b7128c8662577e6892af92651ad (patch)
tree46464b34b4207fec3686ec8d8f873ae222246fab
parent521d2bc9779218ff95b83b9443f7e3d164bcd450 (diff)
downloadjavassist-0f1701d237160b7128c8662577e6892af92651ad.tar.gz
javassist-0f1701d237160b7128c8662577e6892af92651ad.zip
Allow for retrieval of the real type name of the annotation.
We need this to emulate isAnnotationPresent(), etc. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@241 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r--src/main/javassist/bytecode/annotation/AnnotationImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/javassist/bytecode/annotation/AnnotationImpl.java b/src/main/javassist/bytecode/annotation/AnnotationImpl.java
index 91e8989b..59f83e0d 100644
--- a/src/main/javassist/bytecode/annotation/AnnotationImpl.java
+++ b/src/main/javassist/bytecode/annotation/AnnotationImpl.java
@@ -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
{