javassist.tools.rmi

Class StubGenerator

public class StubGenerator extends Object implements Translator

A stub-code generator. It is used for producing a proxy class.

The proxy class for class A is as follows:

Instances of the proxy class is created by an ObjectImporter object.

Constructor Summary
StubGenerator()
Constructs a stub-code generator.
Method Summary
booleanisProxyClass(String name)
Returns true if the specified class is a proxy class recorded by makeProxyClass().
booleanmakeProxyClass(Class clazz)
Makes a proxy class.
voidonLoad(ClassPool pool, String classname)
Does nothing.
voidstart(ClassPool pool)
Initializes the object.

Constructor Detail

StubGenerator

public StubGenerator()
Constructs a stub-code generator.

Method Detail

isProxyClass

public boolean isProxyClass(String name)
Returns true if the specified class is a proxy class recorded by makeProxyClass().

Parameters: name a fully-qualified class name

makeProxyClass

public boolean makeProxyClass(Class clazz)
Makes a proxy class. The produced class is substituted for the original class.

Parameters: clazz the class referenced through the proxy class.

Returns: false if the proxy class has been already produced.

onLoad

public void onLoad(ClassPool pool, String classname)
Does nothing. This is a method declared in javassist.Translator.

See Also: onLoad

start

public void start(ClassPool pool)
Initializes the object. This is a method declared in javassist.Translator.

See Also: start

Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.