<P>The Original Code is Javassist.
<P>The Initial Developer of the Original Code is Shigeru Chiba.
Portions created by the Initial Developer are<BR>
- Copyright (C) 1999-2008 Shigeru Chiba. All Rights Reserved.
+ Copyright (C) 1999-2009 Shigeru Chiba. All Rights Reserved.
<P>Contributor(s): ______________________________________.
<P>Alternatively, the contents of this file may be used under the terms of
<h1>Javassist version 3</h1>
-<h3>Copyright (C) 1999-2008 by Shigeru Chiba, All rights reserved.</h3>
+<h3>Copyright (C) 1999-2009 by Shigeru Chiba, All rights reserved.</h3>
<p><br></p>
<p>-version 3.10
<ul>
- <li>JIRA JASSIST-69, 70
+ <li>JIRA JASSIST-69, 70, 71 were fixed.
</ul>
<p>-version 3.9 on October 9, 2008
<h2>Copyright notices</h2>
<p>Javassist, a Java-bytecode translator toolkit.
-<br>Copyright (C) 1999-2007 Shigeru Chiba. All Rights Reserved.
+<br>Copyright (C) 1999-2009 Shigeru Chiba. All Rights Reserved.
<p>The contents of this software, Javassist, are subject to
the Mozilla Public License Version 1.1 (the "License");<br>
<p>The Initial Developer of the Original Code is Shigeru Chiba.
Portions created by the Initial Developer are<br>
-Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.
+Copyright (C) 1999-2009 Shigeru Chiba. All Rights Reserved.
<p>Contributor(s): ______________________________________.
<p>Alternatively, the contents of this software may be used under the
<project name="javassist" default="jar" basedir=".">
- <property name="dist-version" value="javassist-3.9.0"/>
+ <property name="dist-version" value="javassist-3.10.0"/>
<property environment="env"/>
<property name="target.jar" value="javassist.jar"/>
windowtitle="Javassist API">
<doctitle><![CDATA[<h1>Javassist</h1>]]></doctitle>
<bottom><![CDATA[<i>Javassist, a Java-bytecode translator toolkit.<br>
-Copyright (C) 1999-2008 Shigeru Chiba. All Rights Reserved.</i>]]></bottom>
+Copyright (C) 1999-2009 Shigeru Chiba. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
<description>Javassist (JAVA programming ASSISTant) makes Java bytecode manipulation
simple. It is a class library for editing bytecodes in Java.
</description>
- <version>3.9.0.GA</version>
+ <version>3.10.0.GA</version>
<name>Javassist</name>
<url>http://www.javassist.org/</url>
<build>
Specification-Title: Javassist
Created-By: Shigeru Chiba, Tokyo Institute of Technology
Specification-Vendor: Shigeru Chiba, Tokyo Institute of Technology
-Specification-Version: 3.9.0.GA
+Specification-Version: 3.10.0.GA
Main-Class: javassist.CtClass
Name: javassist/
/**
* The version number of this release.
*/
- public static final String version = "3.9.0.GA";
+ public static final String version = "3.10.0.GA";
/**
* Prints the version number and the copyright notice.
*/
public static void main(String[] args) {
System.out.println("Javassist version " + CtClass.version);
- System.out.println("Copyright (C) 1999-2008 Shigeru Chiba."
+ System.out.println("Copyright (C) 1999-2009 Shigeru Chiba."
+ " All Rights Reserved.");
}
/**
* Makes a copy of this constructor and converts it into a method.
- * The signature of the mehtod is the same as the that of this constructor.
+ * The signature of the method is the same as the that of this constructor.
* The return type is <code>void</code>. The resulting method must be
* appended to the class specified by <code>declaring</code>.
* If this constructor is a static initializer, the resulting method takes
* eliminated from the resulting method.
*
* <p>The immediate super class of the class declaring this constructor
- * must be also a super class of the class declaring the resulting method.
+ * must be also a super class of the class declaring the resulting method
+ * (this is obviously true if the second parameter <code>declaring</code> is
+ * the same as the class declaring this constructor).
* If the constructor accesses a field, the class declaring the resulting method
* must also declare a field with the same name and type.
*
* @param name the name of the resulting method.
* @param declaring the class declaring the resulting method.
+ * It is normally the same as the class declaring this
+ * constructor.
* @param map the hash table associating original class names
* with substituted names. The original class names will be
* replaced while making a copy.
public final class CtMethod extends CtBehavior {
protected String cachedStringRep;
+ /**
+ * @see #make(MethodInfo minfo, CtClass declaring)
+ */
CtMethod(MethodInfo minfo, CtClass declaring) {
super(declaring, minfo);
cachedStringRep = null;
* If it is <code>null</code>, the created method
* does nothing except returning zero or null.
* @param declaring the class to which the created method is added.
+ * @see #make(int, CtClass, String, CtClass[], CtClass[], String, CtClass)
*/
public static CtMethod make(CtClass returnType,
String mname, CtClass[] parameters,
}
/**
- * Creates a method.
+ * Creates a method. <code>modifiers</code> can contain
+ * <code>Modifier.STATIC</code>.
*
* @param modifiers access modifiers.
* @param returnType the type of the returned value.
public final class FramePrinter {
private final PrintStream stream;
+ /**
+ * Constructs a bytecode printer.
+ */
public FramePrinter(PrintStream stream) {
this.stream = stream;
}
+ /**
+ * Prints all the methods declared in the given class.
+ */
public static void print(CtClass clazz, PrintStream stream) {
(new FramePrinter(stream)).print(clazz);
}
+ /**
+ * Prints all the methods declared in the given class.
+ */
public void print(CtClass clazz) {
CtMethod[] methods = clazz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
}
}
+ /**
+ * Prints the instructions and the frame states of the given method.
+ */
public void print(CtMethod method) {
stream.println("\n" + getMethodString(method));
MethodInfo info = method.getMethodInfo2();
while (count-- > 0)
stream.print(' ');
}
-
}