|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.fortress.impl.factory.BCELWrapperGenerator
Create the BCELWrapper for the component
| Nested Class Summary | |
private class |
BCELWrapperGenerator.BCELClassLoader |
| Field Summary | |
private BCELWrapperGenerator.BCELClassLoader |
m_bcelClassLoaderThe ClassLoader to use when loading a class generated by this BCELWrapperGenerator. |
private ClassGen |
m_classGeneratorThe ClassGen instance to use for byte code generation. |
private BCELCodeGenerator |
m_codeGeneratorThe BCELCodeGenerator to use for byte code generation. |
private Repository |
m_repositoryThe BCEL util.Repository instance to use when loading JavaClass instances. |
private static java.lang.String |
WRAPPER_CLASS_INTERFACE_NAMEThe name of the interface each generated wrapper class has to implement. |
private static java.lang.String |
WRAPPER_CLASS_SUFFIXThe suffix to be appended to the name of the wrapped class when creating the name of the wrapper class. |
private static java.lang.String |
WRAPPER_SUPERCLASS_NAMEThe name of the superclass of the wrapper class to be generated. |
| Constructor Summary | |
BCELWrapperGenerator()No-args default constructor. |
|
| Method Summary | |
private byte[] |
buildWrapper(JavaClass[] interfacesToImplement)Generates the wrapper byte code for a given interface. |
java.lang.Class |
createWrapper(java.lang.Class classToWrap) |
private java.lang.String[] |
extractInterfaceNames(java.lang.Class[] interfaces)Takes an array of Class instances supposed to represent interfaces and returns a list of the names of those interfaces. |
private JavaClass |
lookupClass(java.lang.Class clazz)Takes a Class instance as a its parameter and returns corresponding the JavaClass instance as used by BCEL. |
private JavaClass[] |
lookupClasses(java.lang.Class[] classes)Takes an array of Class instances and returns an array holding the corresponding JavaClass instances as used by BCEL. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Repository m_repository
private static final java.lang.String WRAPPER_CLASS_SUFFIX
private static final java.lang.String WRAPPER_SUPERCLASS_NAME
private static final java.lang.String WRAPPER_CLASS_INTERFACE_NAME
private final BCELCodeGenerator m_codeGenerator
BCELCodeGenerator to use for byte code generation.
private ClassGen m_classGenerator
ClassGen instance to use for byte code generation.
private final BCELWrapperGenerator.BCELClassLoader m_bcelClassLoader
ClassLoader to use when loading a class generated by this BCELWrapperGenerator.
| Constructor Detail |
public BCELWrapperGenerator()
| Method Detail |
public java.lang.Class createWrapper(java.lang.Class classToWrap)
throws java.lang.Exception
java.lang.Exception
private JavaClass lookupClass(java.lang.Class clazz)
throws java.lang.Exception
Class instance as a its parameter and returns corresponding the JavaClass instance as used by BCEL.
clazz - The Class instance we want to turn into a JavaClassJavaClass representing the given Class instancejava.lang.Exception
private JavaClass[] lookupClasses(java.lang.Class[] classes)
throws java.lang.Exception
Class instances and returns an array holding the corresponding JavaClass instances as used by BCEL.
classes - An array holding Class instances we want to turn into JavaClass instancesJavaClass instances representing the given Class instancesjava.lang.Exceptionprivate java.lang.String[] extractInterfaceNames(java.lang.Class[] interfaces)
Class instances supposed to represent interfaces and returns a list of the names of those interfaces.
interfaces - An array of Class instancesClass instances
private byte[] buildWrapper(JavaClass[] interfacesToImplement)
throws java.lang.Exception
interfacesToImplement - The interfaces we want to generate wrapper byte code forjava.lang.Exception
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||