|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.fortress.impl.factory.BCELCodeGenerator
BCELCodeGenerator
creates implementations for the
Method
s and
Field
s needed in creating a
WrapperClass
.
Constructor Summary | |
BCELCodeGenerator()
Default constructor. |
Method Summary | |
org.apache.bcel.classfile.Method |
createDefaultConstructor()
Create the wrapper class' default constructor: |
org.apache.bcel.classfile.Method[] |
createImplementation(org.apache.bcel.classfile.JavaClass interfaceToImplement)
Creates an implementation for the supplied JavaClass
instance representing an interface. |
org.apache.bcel.classfile.Method |
createMethodWrapper(org.apache.bcel.classfile.Method methodToWrap)
Create a method declaration/definition of the form |
org.apache.bcel.classfile.Method |
createMethodWrapper(String methodName,
org.apache.bcel.generic.Type returnType,
org.apache.bcel.generic.Type[] parameterTypes,
String[] exceptionNames)
Create a method declaration/definition of the form |
org.apache.bcel.classfile.Method |
createWrappedClassAccessor()
Create a field accessor for the wrapped class instance of the form |
org.apache.bcel.classfile.Field |
createWrappedClassField()
Create a field declaration of the form |
void |
init(String wrapperClassName,
String wrapperSuperclassName,
org.apache.bcel.classfile.JavaClass classToWrap,
org.apache.bcel.generic.ClassGen classGenerator)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BCELCodeGenerator()
Method Detail |
public void init(String wrapperClassName, String wrapperSuperclassName, org.apache.bcel.classfile.JavaClass classToWrap, org.apache.bcel.generic.ClassGen classGenerator) throws IllegalArgumentException
IllegalArgumentException
public org.apache.bcel.classfile.Field createWrappedClassField() throws IllegalStateException
private WRAPPED_CLASS_FN;
IllegalStateException
- If this instance is not initialized.public org.apache.bcel.classfile.Method createDefaultConstructor() throws IllegalStateException
public ( classToWrap)
{
this. = classToWrap;
}
IllegalStateException
- If this instance is not initialized.public org.apache.bcel.classfile.Method createWrappedClassAccessor() throws IllegalStateException
public Object ()
{
return this.;
}
IllegalStateException
public org.apache.bcel.classfile.Method createMethodWrapper(String methodName, org.apache.bcel.generic.Type returnType, org.apache.bcel.generic.Type[] parameterTypes, String[] exceptionNames) throws IllegalArgumentException, IllegalStateException
public ()
throws
{
return this..();
}
methodName
- The name of the method to createreturnType
- The return type of the method to createparameterTypes
- The array of parameter types of the method to createexceptionNames
- The array of the names of the exceptions the method
to create might throw
Method
object representing the created method
IllegalArgumentException
- If any of the parameters passed in is null.
IllegalStateException
- If this instance is not initialized.public org.apache.bcel.classfile.Method createMethodWrapper(org.apache.bcel.classfile.Method methodToWrap) throws IllegalArgumentException, IllegalStateException
public ()
throws
{
return this..();
}
methodToWrap
- The Method
to create a wrapper for.
IllegalArgumentException
- If methodToWrao
is null.
IllegalStateException
- If this instance is not initialized.public org.apache.bcel.classfile.Method[] createImplementation(org.apache.bcel.classfile.JavaClass interfaceToImplement) throws Exception
JavaClass
instance representing an interface.
interfaceToImplement
- The interface we want to create an implementation for
Method
instances representing the interface implementation.
IllegalArgumentException
- If interfaceToImplement
is null
or does not represent an interface
IllegalStateException
- If this instance has not been initialized
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |