public class OldClassInstrumentor extends ClassInstrumentor
ClassInstrumentor.Decorator
Constructor and Description |
---|
OldClassInstrumentor(ClassInstrumentor.Decorator decorator) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDirectCallConstructor(MutableClass mutableClass)
Generates code like this:
|
protected void |
generateClassHandlerCall(MutableClass mutableClass,
org.objectweb.asm.tree.MethodNode originalMethod,
String originalMethodName,
RobolectricGeneratorAdapter generator) |
protected void |
interceptInvokeVirtualMethod(MutableClass mutableClass,
ListIterator<org.objectweb.asm.tree.AbstractInsnNode> instructions,
org.objectweb.asm.tree.MethodInsnNode targetMethod)
Decides to call through the appropriate method to intercept the method with an INVOKEVIRTUAL Opcode, depending if the invokedynamic bytecode instruction is available (Java 7+).
|
protected void |
writeCallToInitializing(MutableClass mutableClass,
RobolectricGeneratorAdapter generator) |
analyzeClass, exceptionArray, instrument, instrument, instrumentNativeMethod, instrumentNormalMethod, makeMethodPrivate, makeMethodPublic
public OldClassInstrumentor(ClassInstrumentor.Decorator decorator)
protected void addDirectCallConstructor(MutableClass mutableClass)
Generates code like this:
public ThisClass(DirectObjectMarker dom, ThisClass domInstance) {
super(dom, domInstance);
__robo_data__ = domInstance;
}
addDirectCallConstructor
in class ClassInstrumentor
protected void writeCallToInitializing(MutableClass mutableClass, RobolectricGeneratorAdapter generator)
writeCallToInitializing
in class ClassInstrumentor
protected void generateClassHandlerCall(MutableClass mutableClass, org.objectweb.asm.tree.MethodNode originalMethod, String originalMethodName, RobolectricGeneratorAdapter generator)
generateClassHandlerCall
in class ClassInstrumentor
protected void interceptInvokeVirtualMethod(MutableClass mutableClass, ListIterator<org.objectweb.asm.tree.AbstractInsnNode> instructions, org.objectweb.asm.tree.MethodInsnNode targetMethod)
Decides to call through the appropriate method to intercept the method with an INVOKEVIRTUAL Opcode, depending if the invokedynamic bytecode instruction is available (Java 7+).
interceptInvokeVirtualMethod
in class ClassInstrumentor