aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/SignatureAttribute.java
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2012-06-17 15:57:19 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2012-06-17 15:57:19 +0000
commit721ab4e11e031a4667623cbdec9c24502a13d905 (patch)
tree8d058f344296f3941f4e1e0e02b4022860354e91 /src/main/javassist/bytecode/SignatureAttribute.java
parente2cfbeaed7be298c93251f6f9af480cdba84f68f (diff)
downloadjavassist-721ab4e11e031a4667623cbdec9c24502a13d905.tar.gz
javassist-721ab4e11e031a4667623cbdec9c24502a13d905.zip
implemented JASSIST-170
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@640 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode/SignatureAttribute.java')
-rw-r--r--src/main/javassist/bytecode/SignatureAttribute.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/main/javassist/bytecode/SignatureAttribute.java b/src/main/javassist/bytecode/SignatureAttribute.java
index 9e6921c5..4ebb457d 100644
--- a/src/main/javassist/bytecode/SignatureAttribute.java
+++ b/src/main/javassist/bytecode/SignatureAttribute.java
@@ -182,14 +182,14 @@ public class SignatureAttribute extends AttributeInfo {
/**
* Constructs a class signature.
*
- * @param p type parameters.
- * @param s the super class.
- * @param i the interface types.
+ * @param params type parameters.
+ * @param superClass the super class.
+ * @param interfaces the interface types.
*/
- public ClassSignature(TypeParameter[] p, ClassType s, ClassType[] i) {
- params = p == null ? new TypeParameter[0] : p;
- superClass = s == null ? ClassType.OBJECT : s;
- interfaces = i == null ? new ClassType[0] : i;
+ public ClassSignature(TypeParameter[] params, ClassType superClass, ClassType[] interfaces) {
+ this.params = params == null ? new TypeParameter[0] : params;
+ this.superClass = superClass == null ? ClassType.OBJECT : superClass;
+ this.interfaces = interfaces == null ? new ClassType[0] : interfaces;
}
/**
@@ -273,13 +273,13 @@ public class SignatureAttribute extends AttributeInfo {
* to represent <code>void</code> or nothing.
*
* @param tp type parameters.
- * @param p parameter types.
- * @param ret a return type.
+ * @param params parameter types.
+ * @param ret a return type, or null if the return type is <code>void</code>.
* @param ex exception types.
*/
- public MethodSignature(TypeParameter[] tp, Type[] p, Type ret, ObjectType[] ex) {
+ public MethodSignature(TypeParameter[] tp, Type[] params, Type ret, ObjectType[] ex) {
typeParams = tp == null ? new TypeParameter[0] : tp;
- params = p == null ? new Type[0] : p;
+ this.params = params == null ? new Type[0] : params;
retType = ret == null ? new BaseType("void") : ret;
exceptions = ex == null ? new ObjectType[0] : ex;
}
@@ -689,6 +689,16 @@ public class SignatureAttribute extends AttributeInfo {
}
/**
+ * Constructs a <code>ClassType</code>. It represents
+ * the name of a non-nested class.
+ *
+ * @param className a fully qualified class name.
+ */
+ public ClassType(String className) {
+ this(className, null);
+ }
+
+ /**
* Returns the class name.
*/
public String getName() {