aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/CtBehavior.java
diff options
context:
space:
mode:
authoradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-02-15 18:12:27 +0000
committeradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-02-15 18:12:27 +0000
commit7bb1f60c5b48f2ef8c481fd00e61763bc9e02f19 (patch)
tree1dd2c0cd937aa8e4fc86c89cac5e733d77961ac4 /src/main/javassist/CtBehavior.java
parentf280738536267d7ec1f6de1052861007a16a794a (diff)
downloadjavassist-7bb1f60c5b48f2ef8c481fd00e61763bc9e02f19.tar.gz
javassist-7bb1f60c5b48f2ef8c481fd00e61763bc9e02f19.zip
Add support for getParameterAnnotations() from the CtBehaviour.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@246 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/CtBehavior.java')
-rw-r--r--src/main/javassist/CtBehavior.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/javassist/CtBehavior.java b/src/main/javassist/CtBehavior.java
index 71047844..5eaa1e58 100644
--- a/src/main/javassist/CtBehavior.java
+++ b/src/main/javassist/CtBehavior.java
@@ -153,6 +153,23 @@ public abstract class CtBehavior extends CtMember {
}
/**
+ * Returns the parameter annotations associated with this method or constructor.
+ *
+ * @return an array of annotation-type objects.
+ * @see CtMember#getAnnotations()
+ * @since 3.1
+ */
+ public Object[][] getParameterAnnotations() throws ClassNotFoundException {
+ MethodInfo mi = getMethodInfo2();
+ ParameterAnnotationsAttribute ainfo = (ParameterAnnotationsAttribute)
+ mi.getAttribute(ParameterAnnotationsAttribute.invisibleTag);
+ ParameterAnnotationsAttribute ainfo2 = (ParameterAnnotationsAttribute)
+ mi.getAttribute(ParameterAnnotationsAttribute.visibleTag);
+ return CtClassType.toAnnotationType(getDeclaringClass().getClassPool(),
+ ainfo, ainfo2);
+ }
+
+ /**
* Obtains parameter types of this method/constructor.
*/
public CtClass[] getParameterTypes() throws NotFoundException {