| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectclassUtils.javassist.rmi.StubGenerator
public class StubGenerator
A stub-code generator. It is used for producing a proxy class.
The proxy class for class A is as follows:
public class A implements Proxy, Serializable {
   private ObjectImporter importer;
   private int objectId;
   public int _getObjectId() { return objectId; }
   public A(ObjectImporter oi, int id) {
     importer = oi; objectId = id;
   }
   ... the same methods that the original class A declares ...
 }
 Instances of the proxy class are created by an
 ObjectImporter object.
| Constructor Summary | |
|---|---|
| StubGenerator()Constructs a stub-code generator. | |
| Method Summary | |
|---|---|
|  boolean | isProxyClass(java.lang.String name)Returns trueif the specified class is a proxy class
 recorded bymakeProxyClass(). | 
|  boolean | makeProxyClass(java.lang.Class clazz)Makes a proxy class. | 
|  void | onWrite(ClassPool pool,
        java.lang.String classname)Is invoked by a ClassPoolfor notifying that
 a class is written out to an output stream. | 
|  void | start(ClassPool pool)Is a method declared in javassist.Translator. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public StubGenerator()
| Method Detail | 
|---|
public void start(ClassPool pool)
           throws NotFoundException
start in interface Translatorpool - the ClassPool that this translator
                          is attached to.
NotFoundExceptionTranslator.start(ClassPool)
public void onWrite(ClassPool pool,
                    java.lang.String classname)
TranslatorClassPool for notifying that
 a class is written out to an output stream.
 If CtClass.frozen() is true, that is, if the class has been already modified and written, then onWrite() is not invoked.
onWrite in interface Translatorpool - the ClassPool that this translator
                          is attached to.classname - a fully-qualified class nameClassPool.writeFile(String), 
ClassPool.writeFile(String, String), 
ClassPool.write(String), 
ClassPool.write(String,DataOutputStream)public boolean isProxyClass(java.lang.String name)
true if the specified class is a proxy class
 recorded by makeProxyClass().
name - a fully-qualified class name
public boolean makeProxyClass(java.lang.Class clazz)
                       throws CannotCompileException,
                              NotFoundException
clazz - the class referenced
                          through the proxy class.
false if the proxy class
                  has been already produced.
CannotCompileException
NotFoundException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||