|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.component.asmgen.AbstractInterfaceClassGenerator
Abstract parent class for Interface implementation generation. It defines a skeleton for the classes generation, and provides a set of utility methods that will be used by derived classes.
Field Summary | |
protected java.lang.Class |
cl
|
protected org.objectweb.asm.ClassWriter |
classGenerator
|
protected java.lang.String |
className
|
protected static java.lang.String |
FUNCTIONAL_INTERFACE_NAME_FIELD_NAME
|
protected static java.lang.String |
FUNCTIONAL_INTERFACE_NAME_TYPE
|
protected java.util.Vector |
interfacesToImplement
|
protected static java.lang.String |
METHOD_ARRAY_TYPE
|
protected static java.lang.String |
METHOD_TYPE
|
protected static java.lang.String |
METHODCALL_TYPE
|
protected java.lang.reflect.Method[] |
methods
|
protected static java.lang.String |
OBJECT_ARRAY_TYPE
|
protected static java.lang.String |
OBJECT_TYPE
|
protected java.lang.String |
packageName
|
protected java.lang.String |
stubClassFullName
|
protected java.lang.String |
stubClassSimpleName
|
protected static java.lang.String |
SUPER_CLASS_NAME
|
Fields inherited from interface org.objectweb.asm.Constants |
AALOAD, AASTORE, ACC_ABSTRACT, ACC_BRIDGE, ACC_DEPRECATED, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VARARGS, ACC_VOLATILE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD, DMUL, DNEG, DREM, DRETURN, DSTORE, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GOTO, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDC, LDIV, LLOAD, LMUL, LNEG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEW, NEWARRAY, NOP, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SWAP, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT, TABLESWITCH |
Constructor Summary | |
AbstractInterfaceClassGenerator()
|
Method Summary | |
protected static int |
convertJavaModifierToASM(int javaModifier)
utility method |
byte[] |
create()
actually creates the bytecode corresponding to the generated class |
protected org.objectweb.asm.ClassWriter |
createClassGenerator()
|
protected void |
createConstructor()
|
protected abstract void |
createDefaultMethods()
Method createDefaultMethods. |
protected abstract void |
createFields()
Method createFields. |
protected abstract org.objectweb.asm.CodeVisitor |
createMethod(int i,
java.lang.reflect.Method method)
Method createMethod. |
protected org.objectweb.asm.CodeVisitor |
createMethodGenerator(java.lang.reflect.Method m)
|
protected void |
createReturnCode(org.objectweb.asm.CodeVisitor cv,
java.lang.Class c)
|
protected abstract void |
createStaticInitializer()
Method createStaticInitializer. |
protected abstract void |
createStaticVariables()
Method createStaticVariables. |
protected void |
createUnwrappingCode(org.objectweb.asm.CodeVisitor cv,
java.lang.Class c)
|
protected java.lang.Class |
defineClass(java.lang.String className,
byte[] bytes)
|
protected int |
getOpcodeOffset(java.lang.Class type)
Returns the offset which must be added to some opcodes to get an opcode of the given type. |
protected int |
getSize(java.lang.Class type)
Return the size of the given type. |
java.lang.String |
getStubClassFullName()
utility method |
protected java.lang.Class |
loadClass(java.lang.String className)
|
protected static int |
removeNativeAndAbstractModifiers(int modifiers)
utility method |
protected void |
setInfos()
This method is called by the constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String METHODCALL_TYPE
protected static final java.lang.String OBJECT_TYPE
protected static final java.lang.String OBJECT_ARRAY_TYPE
protected static final java.lang.String METHOD_TYPE
protected static final java.lang.String METHOD_ARRAY_TYPE
protected static final java.lang.String FUNCTIONAL_INTERFACE_NAME_TYPE
protected static final java.lang.String FUNCTIONAL_INTERFACE_NAME_FIELD_NAME
protected static final java.lang.String SUPER_CLASS_NAME
protected java.lang.Class cl
protected java.lang.String className
protected java.lang.String packageName
protected java.lang.reflect.Method[] methods
protected java.util.Vector interfacesToImplement
protected org.objectweb.asm.ClassWriter classGenerator
protected java.lang.String stubClassSimpleName
protected java.lang.String stubClassFullName
Constructor Detail |
public AbstractInterfaceClassGenerator()
Method Detail |
protected abstract void createStaticInitializer() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected abstract void createFields()
protected abstract void createDefaultMethods()
protected abstract org.objectweb.asm.CodeVisitor createMethod(int i, java.lang.reflect.Method method)
i
- method
-
protected abstract void createStaticVariables()
protected static int convertJavaModifierToASM(int javaModifier)
javaModifier
-
protected static int removeNativeAndAbstractModifiers(int modifiers)
modifiers
-
public java.lang.String getStubClassFullName()
public byte[] create() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected org.objectweb.asm.ClassWriter createClassGenerator()
protected void createConstructor()
protected org.objectweb.asm.CodeVisitor createMethodGenerator(java.lang.reflect.Method m)
protected void createUnwrappingCode(org.objectweb.asm.CodeVisitor cv, java.lang.Class c)
protected void createReturnCode(org.objectweb.asm.CodeVisitor cv, java.lang.Class c)
protected int getOpcodeOffset(java.lang.Class type)
type
- a Java class representing a Java type (primitive or not).
protected int getSize(java.lang.Class type)
type
- a Java class representing a Java type (primitive or not).
protected java.lang.Class defineClass(java.lang.String className, byte[] bytes)
protected java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected void setInfos() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |