1 package org.robolectric.internal; 2 3 import org.robolectric.util.ReflectionHelpers; 4 5 @SuppressWarnings("TypeParameterUnusedInFormals") 6 public interface IShadow { 7 <T> T extract(Object instance); 8 9 <T> T newInstanceOf(Class<T> clazz); 10 11 <T> T newInstance(Class<T> clazz, Class[] parameterTypes, Object[] params); 12 13 <T> T directlyOn(T shadowedObject, Class<T> clazz); 14 15 @SuppressWarnings("unchecked") 16 <R> R directlyOn(Object shadowedObject, String clazzName, String methodName, ReflectionHelpers.ClassParameter... paramValues); 17 18 <R, T> R directlyOn(T shadowedObject, Class<T> clazz, String methodName, ReflectionHelpers.ClassParameter... paramValues); 19 20 <R, T> R directlyOn(Class<T> clazz, String methodName, ReflectionHelpers.ClassParameter... paramValues); 21 22 <R> R invokeConstructor(Class<? extends R> clazz, R instance, ReflectionHelpers.ClassParameter... paramValues); 23 24 String directMethodName(String className, String methodName); 25 } 26