diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/javassist/ByteArrayClassPath.java | 1 | ||||
-rw-r--r-- | src/main/javassist/ClassPool.java | 1 | ||||
-rw-r--r-- | src/main/javassist/CtBehavior.java | 4 | ||||
-rw-r--r-- | src/main/javassist/CtClass.java | 4 | ||||
-rw-r--r-- | src/main/javassist/package.html | 12 |
5 files changed, 19 insertions, 3 deletions
diff --git a/src/main/javassist/ByteArrayClassPath.java b/src/main/javassist/ByteArrayClassPath.java index d001ce87..5e30249d 100644 --- a/src/main/javassist/ByteArrayClassPath.java +++ b/src/main/javassist/ByteArrayClassPath.java @@ -43,6 +43,7 @@ import java.net.MalformedURLException; * @see javassist.ClassPath * @see ClassPool#insertClassPath(ClassPath) * @see ClassPool#appendClassPath(ClassPath) + * @see ClassPool#makeClass(InputStream) */ public class ByteArrayClassPath implements ClassPath { protected String classname; diff --git a/src/main/javassist/ClassPool.java b/src/main/javassist/ClassPool.java index 68796a40..4e00b335 100644 --- a/src/main/javassist/ClassPool.java +++ b/src/main/javassist/ClassPool.java @@ -662,6 +662,7 @@ public class ClassPool { * @param classfile class file. * @exception RuntimeException if there is a frozen class with the * the same name. + * @see javassist.ByteArrayClassPath */ public CtClass makeClass(InputStream classfile) throws IOException, RuntimeException diff --git a/src/main/javassist/CtBehavior.java b/src/main/javassist/CtBehavior.java index ea256482..01f907cf 100644 --- a/src/main/javassist/CtBehavior.java +++ b/src/main/javassist/CtBehavior.java @@ -109,6 +109,8 @@ public abstract class CtBehavior extends CtMember { /** * Obtains exceptions that this method/constructor may throw. + * + * @return a zero-length array if there is no throws clause. */ public CtClass[] getExceptionTypes() throws NotFoundException { String[] exceptions; @@ -126,7 +128,7 @@ public abstract class CtBehavior extends CtMember { */ public void setExceptionTypes(CtClass[] types) throws NotFoundException { declaringClass.checkModify(); - if (types == null) { + if (types == null || types.length == 0) { methodInfo.removeExceptionsAttribute(); return; } diff --git a/src/main/javassist/CtClass.java b/src/main/javassist/CtClass.java index 268c40f1..4c6f7bd7 100644 --- a/src/main/javassist/CtClass.java +++ b/src/main/javassist/CtClass.java @@ -40,6 +40,10 @@ public abstract class CtClass { /** * Prints the version number and the copyright notice. + * + * <p>The following command invokes this method: + * + * <ul><pre>java -jar javassist.jar</pre></ul> */ public static void main(String[] args) { System.out.println("Javassist version " + CtClass.version); diff --git a/src/main/javassist/package.html b/src/main/javassist/package.html index 1b6e4b94..f5b66b98 100644 --- a/src/main/javassist/package.html +++ b/src/main/javassist/package.html @@ -2,13 +2,21 @@ <body> The Javassist Core API. -<p>Javassist (<i>Java</i> programming <i>assist</i>ant) is yet another -reflective system for Java. It is a class library for editing +<p>Javassist (<i>Java</i> programming <i>assist</i>ant) makes bytecode +engineering simple. It is a class library for editing bytecode in Java; it enables Java programs to define a new class at runtime and to modify a given class file when the JVM loads it. <p>The most significant class of this package is <code>CtClass</code>. See the description of this class first. +<p>To know the version number of this package, type the following command: + +<ul><pre> +java -jar javassist.jar +</pre></ul> + +<p>It prints the version number on the console. + </body> </html> |