git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@466 30ef5769-5b8d-40dd-aea6-55b5d6557bb3tags/rel_3_17_1_ga
@@ -353,7 +353,7 @@ MISCELLANEOUS.</B> | |||
<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 |
@@ -7,7 +7,7 @@ | |||
<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> | |||
@@ -284,7 +284,7 @@ see javassist.Dump. | |||
<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 | |||
@@ -704,7 +704,7 @@ and <a href="http://www.jboss.org/index.html?module=html&op=userdisplay&id=devel | |||
<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> | |||
@@ -721,7 +721,7 @@ See the License for the specific language governing rights and | |||
<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 |
@@ -6,7 +6,7 @@ | |||
<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"/> | |||
@@ -185,7 +185,7 @@ to ${build.classes.dir}.</echo> | |||
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> | |||
@@ -8,7 +8,7 @@ | |||
<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> |
@@ -2,7 +2,7 @@ Manifest-Version: 1.1 | |||
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/ |
@@ -52,7 +52,7 @@ public abstract class CtClass { | |||
/** | |||
* 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. | |||
@@ -63,7 +63,7 @@ public abstract class CtClass { | |||
*/ | |||
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."); | |||
} | |||
@@ -318,7 +318,7 @@ public final class CtConstructor extends CtBehavior { | |||
/** | |||
* 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 | |||
@@ -329,12 +329,16 @@ public final class CtConstructor extends CtBehavior { | |||
* 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. |
@@ -30,6 +30,9 @@ import javassist.bytecode.*; | |||
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; |
@@ -94,6 +94,7 @@ public class CtNewMethod { | |||
* 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, | |||
@@ -106,7 +107,8 @@ public class CtNewMethod { | |||
} | |||
/** | |||
* 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. |
@@ -37,14 +37,23 @@ import javassist.bytecode.MethodInfo; | |||
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++) { | |||
@@ -62,6 +71,9 @@ public final class FramePrinter { | |||
} | |||
} | |||
/** | |||
* 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(); | |||
@@ -132,5 +144,4 @@ public final class FramePrinter { | |||
while (count-- > 0) | |||
stream.print(' '); | |||
} | |||
} |