Class ShadowImpl
java.lang.Object
org.robolectric.internal.bytecode.ShadowImpl
- All Implemented Interfaces:
IShadow
public class ShadowImpl extends Object implements IShadow
-
Constructor Summary
Constructors Constructor Description ShadowImpl()
-
Method Summary
Modifier and Type Method Description void
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)
String
directMethodName(String className, String methodName)
<T> T
extract(Object instance)
<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
-
directInitialize
- Specified by:
directInitialize
in interfaceIShadow
-