Package org.robolectric.shadows
Class ViewThreadChecker
java.lang.Object
org.robolectric.shadows.ViewThreadChecker
- All Implemented Interfaces:
MethodHandleDecorator
@AutoService(MethodHandleDecorator.class)
public class ViewThreadChecker
extends Object
implements MethodHandleDecorator
A
MethodHandleDecorator that enforces that all View methods are
called on the main thread.
This decorator is enabled if the system property
robolectric.enforceViewMethodsCalledOnMainThread is set to true, or if
is invalid reference
ShadowView#enableThreadChecktrue.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecorate(Class<?> definingClass, String methodName, MethodType methodType, boolean isStatic, MethodHandle original)
-
Constructor Details
-
ViewThreadChecker
public ViewThreadChecker()
-
-
Method Details
-
decorate
public MethodHandle decorate(Class<?> definingClass, String methodName, MethodType methodType, boolean isStatic, MethodHandle original) - Specified by:
decoratein interfaceMethodHandleDecorator
-