[jboss-cvs] javassist/src/main/javassist ...
Shigeru Chiba
chiba at is.titech.ac.jp
Wed Nov 22 21:49:03 EST 2006
User: chiba
Date: 06/11/22 21:49:03
Modified: src/main/javassist CodeConverter.java CtBehavior.java
CtConstructor.java CtMethod.java CtClass.java
Log:
added CtBehavior.getLongName()
Revision Changes Path
1.9 +4 -2 javassist/src/main/javassist/CodeConverter.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CodeConverter.java
===================================================================
RCS file: /cvsroot/jboss/javassist/src/main/javassist/CodeConverter.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- CodeConverter.java 12 Nov 2006 02:43:15 -0000 1.8
+++ CodeConverter.java 23 Nov 2006 02:49:03 -0000 1.9
@@ -224,7 +224,8 @@
String d1 = origMethod.getMethodInfo2().getDescriptor();
String d2 = substMethod.getMethodInfo2().getDescriptor();
if (!d1.equals(d2))
- throw new CannotCompileException("signature mismatch");
+ throw new CannotCompileException("signature mismatch: "
+ + substMethod.getLongName());
int mod1 = origMethod.getModifiers();
int mod2 = substMethod.getModifiers();
@@ -232,7 +233,8 @@
|| (Modifier.isPrivate(mod1) && !Modifier.isPrivate(mod2))
|| origMethod.getDeclaringClass().isInterface()
!= substMethod.getDeclaringClass().isInterface())
- throw new CannotCompileException("invoke-type mismatch");
+ throw new CannotCompileException("invoke-type mismatch "
+ + substMethod.getLongName());
transformers = new TransformCall(transformers, origMethod,
substMethod);
1.33 +8 -0 javassist/src/main/javassist/CtBehavior.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CtBehavior.java
===================================================================
RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtBehavior.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- CtBehavior.java 30 Aug 2006 16:25:25 -0000 1.32
+++ CtBehavior.java 23 Nov 2006 02:49:03 -0000 1.33
@@ -82,6 +82,14 @@
}
/**
+ * Returns the method or constructor name followed by parameter types
+ * such as <code>javassist.CtBehavior.stBody(String)</code>.
+ *
+ * @since 3.5
+ */
+ public abstract String getLongName();
+
+ /**
* Returns the MethodInfo representing this method/constructor in the
* class file.
*/
1.18 +12 -0 javassist/src/main/javassist/CtConstructor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CtConstructor.java
===================================================================
RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtConstructor.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- CtConstructor.java 1 Sep 2006 03:04:43 -0000 1.17
+++ CtConstructor.java 23 Nov 2006 02:49:03 -0000 1.18
@@ -116,6 +116,18 @@
}
/**
+ * Returns the constructor name followed by parameter types
+ * such as <code>javassist.CtConstructor(CtClass[],CtClass)</code>.
+ *
+ * @since 3.5
+ */
+ public String getLongName() {
+ return getDeclaringClass().getName()
+ + (isConstructor() ? Descriptor.toString(getSignature())
+ : ("." + MethodInfo.nameClinit + "()"));
+ }
+
+ /**
* Obtains the name of this constructor.
* It is the same as the simple name of the class declaring this
* constructor. If this object represents a class initializer,
1.15 +11 -0 javassist/src/main/javassist/CtMethod.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CtMethod.java
===================================================================
RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtMethod.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- CtMethod.java 11 Jan 2006 06:45:54 -0000 1.14
+++ CtMethod.java 23 Nov 2006 02:49:03 -0000 1.15
@@ -155,6 +155,17 @@
}
/**
+ * Returns the method name followed by parameter types
+ * such as <code>javassist.CtMethod.setBody(String)</code>.
+ *
+ * @since 3.5
+ */
+ public String getLongName() {
+ return getDeclaringClass().getName() + "."
+ + getName() + Descriptor.toString(getSignature());
+ }
+
+ /**
* Obtains the name of this method.
*/
public String getName() {
1.79 +1 -1 javassist/src/main/javassist/CtClass.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CtClass.java
===================================================================
RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtClass.java,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -b -r1.78 -r1.79
--- CtClass.java 31 Aug 2006 18:46:24 -0000 1.78
+++ CtClass.java 23 Nov 2006 02:49:03 -0000 1.79
@@ -52,7 +52,7 @@
/**
* The version number of this release.
*/
- public static final String version = "3.4";
+ public static final String version = "3.5unstable";
/**
* Prints the version number and the copyright notice.
More information about the jboss-cvs-commits
mailing list