Class ShadowImpl
- java.lang.Object
-
- org.robolectric.internal.bytecode.ShadowImpl
-
-
Constructor Summary
Constructors Constructor Description ShadowImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
directInitialize(Class<?> clazz)
<R,T>
RdirectlyOn(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>
RdirectlyOn(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)
-
-
-
Method Detail
-
newInstanceOf
public <T> T newInstanceOf(Class<T> clazz)
- Specified by:
newInstanceOf
in interfaceIShadow
-
newInstance
public <T> T newInstance(Class<T> clazz, Class[] parameterTypes, Object[] params)
- Specified by:
newInstance
in interfaceIShadow
-
directlyOn
@Deprecated public <T> T directlyOn(T shadowedObject, Class<T> clazz)
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
public String directMethodName(String className, String methodName)
- Specified by:
directMethodName
in interfaceIShadow
-
directInitialize
public void directInitialize(Class<?> clazz)
- Specified by:
directInitialize
in interfaceIShadow
-
-