public class ShadowDecorator extends java.lang.Object implements ClassInstrumentor.Decorator
Constructor and Description |
---|
ShadowDecorator() |
Modifier and Type | Method and Description |
---|---|
void |
decorate(MutableClass mutableClass) |
void |
decorateMethodPreClassHandler(MutableClass mutableClass,
org.objectweb.asm.tree.MethodNode originalMethod,
java.lang.String originalMethodName,
org.robolectric.internal.bytecode.RobolectricGeneratorAdapter generator)
For non-invokedynamic JVMs, generates this code:
|
public void decorate(MutableClass mutableClass)
decorate
in interface ClassInstrumentor.Decorator
public void decorateMethodPreClassHandler(MutableClass mutableClass, org.objectweb.asm.tree.MethodNode originalMethod, java.lang.String originalMethodName, org.robolectric.internal.bytecode.RobolectricGeneratorAdapter generator)
For non-invokedynamic JVMs, generates this code:
if (__robo_data__ instanceof ThisClass) {
try {
return __robo_data__.$$robo$$originalMethod(params);
} (Throwable t) {
throw RobolectricInternals.cleanStackTrace(t);
}
}
Note that this method is only called by OldClassInstrumentor
.
decorateMethodPreClassHandler
in interface ClassInstrumentor.Decorator