Class ShadowDecorator
- java.lang.Object
-
- org.robolectric.internal.bytecode.ShadowDecorator
-
- All Implemented Interfaces:
ClassInstrumentor.Decorator
@AutoService(Decorator.class) @Priority(-2147483648) public class ShadowDecorator extends java.lang.Object implements ClassInstrumentor.Decorator
Decorator which adds Robolectric's shadowing behavior to a class.
-
-
Constructor Summary
Constructors Constructor Description ShadowDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecorate(MutableClass mutableClass)voiddecorateMethodPreClassHandler(MutableClass mutableClass, org.objectweb.asm.tree.MethodNode originalMethod, java.lang.String originalMethodName, RobolectricGeneratorAdapter generator)For non-invokedynamic JVMs, generates this code:
-
-
-
Method Detail
-
decorate
public void decorate(MutableClass mutableClass)
- Specified by:
decoratein interfaceClassInstrumentor.Decorator
-
decorateMethodPreClassHandler
public void decorateMethodPreClassHandler(MutableClass mutableClass, org.objectweb.asm.tree.MethodNode originalMethod, java.lang.String originalMethodName, 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 byOldClassInstrumentor.- Specified by:
decorateMethodPreClassHandlerin interfaceClassInstrumentor.Decorator
-
-