diff options
author | kkhan <kkhan@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2006-07-18 09:35:36 +0000 |
---|---|---|
committer | kkhan <kkhan@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2006-07-18 09:35:36 +0000 |
commit | da847bf6bf5634044a7f2acc07c839aa4f090721 (patch) | |
tree | 908878e20b8c254489e0ffe488221fb1faa30b70 | |
parent | d5642a3c5358ecc08381340cd867b4e10b8e0bb3 (diff) | |
download | javassist-da847bf6bf5634044a7f2acc07c839aa4f090721.tar.gz javassist-da847bf6bf5634044a7f2acc07c839aa4f090721.zip |
Handle Annotation.annotationType() calls
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@297 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r-- | src/main/javassist/bytecode/annotation/AnnotationImpl.java | 5 |
1 files changed, 5 insertions, 0 deletions
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) |