From: chiba Date: Wed, 8 Sep 2004 13:58:03 +0000 (+0000) Subject: updated javadoc comments. X-Git-Tag: rel_3_17_1_ga~481 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7bb9f61c4dd0e02f2a65bd4fa843ffd3b93a0ee2;p=javassist.git updated javadoc comments. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@133 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- diff --git a/src/main/javassist/Loader.java b/src/main/javassist/Loader.java index 91ae21bb..ea0284db 100644 --- a/src/main/javassist/Loader.java +++ b/src/main/javassist/Loader.java @@ -210,6 +210,8 @@ public class Loader extends ClassLoader { * @param cp the ClassPool object for obtaining * a class file. * @param t a translator. + * @throws NotFoundException if t.start() throws an exception. + * @throws CannotCompileException if t.start() throws an exception. */ public void addTranslator(ClassPool cp, Translator t) throws NotFoundException, CannotCompileException { diff --git a/src/main/javassist/Translator.java b/src/main/javassist/Translator.java index a673b0b0..db5a95c9 100644 --- a/src/main/javassist/Translator.java +++ b/src/main/javassist/Translator.java @@ -28,10 +28,16 @@ public interface Translator { /** * Is invoked by a Loader for initialization * when the object is attached to the Loader object. + * This method can be used for getting (for caching) some + * CtClass objects that will be accessed + * in onLoad() in Translator. * * @param pool the ClassPool that this translator * should use. * @see Loader + * @throws NotFoundException if a CtClass cannot be found. + * @throws CannotCompileException if the initialization by this method + * fails. */ void start(ClassPool pool) throws NotFoundException, CannotCompileException; @@ -45,14 +51,19 @@ public interface Translator { * * to read the class file after onLoad() returns. * - *

The class specified by classname may not exist. - * If so, onLoad() should create that class so that - * the Loader can read it. + *

classname may be the name of a class + * that has not been created yet. + * If so, onLoad() must create that class so that + * the Loader can read it after onLoad() + * returns. * * @param pool the ClassPool that this translator * should use. * @param classname the name of the class being loaded. * @see Loader + * @throws NotFoundException if a CtClass cannot be found. + * @throws CannotCompileException if the code transformation + * by this method fails. */ void onLoad(ClassPool pool, String classname) throws NotFoundException, CannotCompileException;