Class ShadowImpl
java.lang.Object
org.robolectric.internal.bytecode.ShadowImpl
- All Implemented Interfaces:
IShadow
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
directInitialize
(Class<?> clazz) <R,
T> R directlyOn
(Class<T> clazz, String methodName, ReflectionHelpers.ClassParameter<?>... paramValues) <R> R
directlyOn
(Object shadowedObject, String clazzName, String methodName, ReflectionHelpers.ClassParameter<?>... paramValues) <T> T
directlyOn
(T shadowedObject, Class<T> clazz) Deprecated.This is incompatible with JDK17+.<R,
T> R directlyOn
(T shadowedObject, Class<T> clazz, String methodName, ReflectionHelpers.ClassParameter<?>... paramValues) directMethodName
(String className, String methodName) directNativeMethodName
(String className, String methodName) <T> T
<R> R
invokeConstructor
(Class<? extends R> clazz, R instance, ReflectionHelpers.ClassParameter<?>... paramValues) <T> T
newInstance
(Class<T> clazz, Class<?>[] parameterTypes, Object[] params) <T> T
newInstanceOf
(Class<T> clazz)
-
Constructor Details
-
ShadowImpl
public ShadowImpl()
-
-
Method Details
-
extract
-
newInstanceOf
- Specified by:
newInstanceOf
in interfaceIShadow
-
newInstance
- Specified by:
newInstance
in interfaceIShadow
-
directlyOn
Returns a proxy object that invokes the original $$robo$$-prefixed methods forshadowedObject
.- Specified by:
directlyOn
in interfaceIShadow
-
directlyOn
public <R> R directlyOn(Object shadowedObject, String clazzName, String methodName, ReflectionHelpers.ClassParameter<?>... paramValues) - Specified by:
directlyOn
in interfaceIShadow
-
directlyOn
public <R,T> R directlyOn(T shadowedObject, Class<T> clazz, String methodName, ReflectionHelpers.ClassParameter<?>... paramValues) - Specified by:
directlyOn
in interfaceIShadow
-
directlyOn
public <R,T> R directlyOn(Class<T> clazz, String methodName, ReflectionHelpers.ClassParameter<?>... paramValues) - Specified by:
directlyOn
in interfaceIShadow
-
invokeConstructor
public <R> R invokeConstructor(Class<? extends R> clazz, R instance, ReflectionHelpers.ClassParameter<?>... paramValues) - Specified by:
invokeConstructor
in interfaceIShadow
-
directMethodName
- Specified by:
directMethodName
in interfaceIShadow
-
directNativeMethodName
- Specified by:
directNativeMethodName
in interfaceIShadow
-
directInitialize
- Specified by:
directInitialize
in interfaceIShadow
-