[jboss-cvs] javassist/src/main/javassist ...
Shigeru Chiba
chiba at is.titech.ac.jp
Mon Jun 18 19:51:07 EDT 2007
User: chiba
Date: 07/06/18 19:51:07
Modified: src/main/javassist CtMember.java CtClass.java
CtMethod.java
Log:
fixed a bug of CtClassType#removeMehtod() etc.
Revision Changes Path
1.19 +4 -2 javassist/src/main/javassist/CtMember.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CtMember.java
===================================================================
RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtMember.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- CtMember.java 8 Jun 2007 13:32:10 -0000 1.18
+++ CtMember.java 18 Jun 2007 23:51:07 -0000 1.19
@@ -106,9 +106,11 @@
m.next = node.next;
if (node == methodTail)
methodTail = m;
- else if (node == consTail)
+
+ if (node == consTail)
consTail = m;
- else if (node == fieldTail)
+
+ if (node == fieldTail)
fieldTail = m;
break;
1.87 +3 -0 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.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- CtClass.java 12 Jun 2007 13:30:14 -0000 1.86
+++ CtClass.java 18 Jun 2007 23:51:07 -0000 1.87
@@ -560,6 +560,9 @@
* to <code>addInterface()</code>; it appends <code>clazz</code> to
* the list of the super interfaces extended by that interface.
* Note that an interface can extend multiple super interfaces.
+ *
+ * @see #replaceClassName(String, String)
+ * @see #replaceClassName(ClassMap)
*/
public void setSuperclass(CtClass clazz) throws CannotCompileException {
checkModify();
1.19 +18 -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.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- CtMethod.java 8 Jun 2007 13:32:10 -0000 1.18
+++ CtMethod.java 18 Jun 2007 23:51:07 -0000 1.19
@@ -126,6 +126,24 @@
}
/**
+ * Creates a method from a <code>MethodInfo</code> object.
+ *
+ * @param declaring the class declaring the method.
+ * @throws CannotCompileException if the the <code>MethodInfo</code>
+ * object and the declaring class have different
+ * <code>ConstPool</code> objects
+ * @since 3.6
+ */
+ public static CtMethod make(MethodInfo minfo, CtClass declaring)
+ throws CannotCompileException
+ {
+ if (declaring.getClassFile2().getConstPool() != minfo.getConstPool())
+ throw new CannotCompileException("bad declaring class");
+
+ return new CtMethod(minfo, declaring);
+ }
+
+ /**
* Returns a hash code value for the method.
* If two methods have the same name and signature, then
* the hash codes for the two methods are equal.
More information about the jboss-cvs-commits
mailing list