diff options
author | chibash <chiba@javassist.org> | 2015-01-06 01:17:34 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2015-01-06 01:17:34 +0900 |
commit | ec3afdfb5d58b98ae8091d59f84d0d2f7f97a725 (patch) | |
tree | f1b1544f83f34fba403281e09c0a32a520286214 /src/test/javassist/JvstTest5.java | |
parent | f2093c28be24336593e1ebd9c2c633ee0f8c5b5c (diff) | |
download | javassist-ec3afdfb5d58b98ae8091d59f84d0d2f7f97a725.tar.gz javassist-ec3afdfb5d58b98ae8091d59f84d0d2f7f97a725.zip |
fixed JASSIST-240. support for Runtime[In]VisibleTypeAnnotations
Diffstat (limited to 'src/test/javassist/JvstTest5.java')
-rw-r--r-- | src/test/javassist/JvstTest5.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/javassist/JvstTest5.java b/src/test/javassist/JvstTest5.java index 32cebbe2..becd5c59 100644 --- a/src/test/javassist/JvstTest5.java +++ b/src/test/javassist/JvstTest5.java @@ -1,5 +1,8 @@ package javassist; +import java.lang.annotation.Annotation; +import java.lang.reflect.TypeVariable; + public class JvstTest5 extends JvstTestRoot { public JvstTest5(String name) { super(name); @@ -31,4 +34,14 @@ public class JvstTest5 extends JvstTestRoot { assertEquals(10, invoke(obj, "run2")); assertEquals(10, invoke(obj, "run3")); } + + public void testTypeAnno() throws Exception { + CtClass cc = sloader.get("test5.TypeAnno"); + cc.getClassFile().compact(); + cc.writeFile(); + Object obj = make(cc.getName()); + TypeVariable<?> t = obj.getClass().getTypeParameters()[0]; + Annotation[] annos = t.getAnnotations(); + assertEquals("@test5.TypeAnnoA()", annos[0].toString()); + } } |