public class InvokeDynamicClassInstrumentor
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
org.robolectric.internal.bytecode.ClassInstrumentor.Decorator |
Constructor and Description |
---|
InvokeDynamicClassInstrumentor(org.robolectric.internal.bytecode.ClassInstrumentor.Decorator decorator) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDirectCallConstructor(MutableClass mutableClass) |
MutableClass |
analyzeClass(byte[] origClassBytes,
InstrumentationConfiguration config,
ClassNodeProvider classNodeProvider) |
protected void |
generateClassHandlerCall(MutableClass mutableClass,
org.objectweb.asm.tree.MethodNode originalMethod,
java.lang.String originalMethodName,
org.robolectric.internal.bytecode.RobolectricGeneratorAdapter generator) |
byte[] |
instrument(byte[] origBytes,
InstrumentationConfiguration config,
ClassNodeProvider classNodeProvider) |
void |
instrument(MutableClass mutableClass) |
protected void |
interceptInvokeVirtualMethod(MutableClass mutableClass,
java.util.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,
org.robolectric.internal.bytecode.RobolectricGeneratorAdapter generator) |
public InvokeDynamicClassInstrumentor(org.robolectric.internal.bytecode.ClassInstrumentor.Decorator decorator)
protected void addDirectCallConstructor(MutableClass mutableClass)
protected void writeCallToInitializing(MutableClass mutableClass, org.robolectric.internal.bytecode.RobolectricGeneratorAdapter generator)
protected void generateClassHandlerCall(MutableClass mutableClass, org.objectweb.asm.tree.MethodNode originalMethod, java.lang.String originalMethodName, org.robolectric.internal.bytecode.RobolectricGeneratorAdapter generator)
protected void interceptInvokeVirtualMethod(MutableClass mutableClass, java.util.ListIterator<org.objectweb.asm.tree.AbstractInsnNode> instructions, org.objectweb.asm.tree.MethodInsnNode targetMethod)
public MutableClass analyzeClass(byte[] origClassBytes, InstrumentationConfiguration config, ClassNodeProvider classNodeProvider)
public byte[] instrument(byte[] origBytes, InstrumentationConfiguration config, ClassNodeProvider classNodeProvider)
public void instrument(MutableClass mutableClass)