/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/ |
D | ShadowActivity.java | 49 import org.robolectric.util.ReflectionHelpers; 78 ReflectionHelpers.setField(realActivity, "mApplication", application); in setApplication() 99 ReflectionHelpers.callInstanceMethod( in callAttach() 103 ReflectionHelpers.ClassParameter.from(Context.class, baseContext), in callAttach() 104 ReflectionHelpers.ClassParameter.from( in callAttach() 106 ReflectionHelpers.ClassParameter.from(Instrumentation.class, instrumentation), in callAttach() 107 ReflectionHelpers.ClassParameter.from(IBinder.class, null), in callAttach() 108 ReflectionHelpers.ClassParameter.from(int.class, 0), in callAttach() 109 ReflectionHelpers.ClassParameter.from(Application.class, application), in callAttach() 110 ReflectionHelpers.ClassParameter.from(Intent.class, intent), in callAttach() [all …]
|
D | ShadowBuild.java | 12 import org.robolectric.util.ReflectionHelpers; 25 ReflectionHelpers.setStaticField(Build.class, "DEVICE", device); in setDevice() 34 ReflectionHelpers.setStaticField(Build.class, "FINGERPRINT", fingerprint); in setFingerprint() 43 ReflectionHelpers.setStaticField(Build.class, "ID", id); in setId() 52 ReflectionHelpers.setStaticField(Build.class, "MODEL", model); in setModel() 61 ReflectionHelpers.setStaticField(Build.class, "MANUFACTURER", manufacturer); in setManufacturer() 70 ReflectionHelpers.setStaticField(Build.VERSION.class, "CODENAME", versionCodename); in setVersionCodename() 79 ReflectionHelpers.setStaticField(Build.VERSION.class, "INCREMENTAL", versionIncremental); in setVersionIncremental() 88 ReflectionHelpers.setStaticField(Build.VERSION.class, "RELEASE", release); in setVersionRelease() 97 ReflectionHelpers.setStaticField(Build.class, "TAGS", tags); in setTags() [all …]
|
D | ShadowViewRootImpl.java | 22 import org.robolectric.util.ReflectionHelpers; 23 import org.robolectric.util.ReflectionHelpers.ClassParameter; 48 ReflectionHelpers.callInstanceMethod(ViewRootImpl.class, component, "dispatchResized", in callDispatchResized() 56 ReflectionHelpers.callInstanceMethod(ViewRootImpl.class, component, "dispatchResized", in callDispatchResized() 63 ReflectionHelpers.callInstanceMethod(ViewRootImpl.class, component, "dispatchResized", in callDispatchResized() 71 ReflectionHelpers.callInstanceMethod(ViewRootImpl.class, component, "dispatchResized", in callDispatchResized() 80 ReflectionHelpers.callInstanceMethod(ViewRootImpl.class, component, "dispatchResized", in callDispatchResized() 90 ReflectionHelpers.callInstanceMethod(ViewRootImpl.class, component, "dispatchResized", in callDispatchResized() 103 ReflectionHelpers.callInstanceMethod( in callDispatchResized() 121 ReflectionHelpers.callInstanceMethod(ViewRootImpl.class, component, "dispatchResized", in callDispatchResized() [all …]
|
D | ShadowAsyncTaskBridge.java | 5 import org.robolectric.util.ReflectionHelpers; 6 import org.robolectric.util.ReflectionHelpers.ClassParameter; 20 …return ReflectionHelpers.callInstanceMethod(asyncTask, "doInBackground", ClassParameter.from(Objec… in doInBackground() 24 ReflectionHelpers.callInstanceMethod(asyncTask, "onPreExecute"); in onPreExecute() 28 …ReflectionHelpers.callInstanceMethod(asyncTask, "onPostExecute", ClassParameter.from(Object.class,… in onPostExecute() 32 …ReflectionHelpers.callInstanceMethod(asyncTask, "onProgressUpdate", ClassParameter.from(Object[].c… in onProgressUpdate() 38 ReflectionHelpers.callInstanceMethod( in onCancelled()
|
D | ShadowMediaRouter.java | 16 import org.robolectric.util.ReflectionHelpers; 17 import org.robolectric.util.ReflectionHelpers.ClassParameter; 34 ReflectionHelpers.callInstanceMethod( in addBluetoothRoute() 58 return ReflectionHelpers.getField( in getBluetoothA2dpRoute() 59 ReflectionHelpers.getStaticField(MediaRouter.class, "sStatic"), "mBluetoothA2dpRoute"); in getBluetoothA2dpRoute() 86 ReflectionHelpers.callInstanceMethod( in callUpdateAudioRoutes() 87 ReflectionHelpers.getStaticField(MediaRouter.class, "sStatic"), in callUpdateAudioRoutes() 96 ReflectionHelpers.setStaticField(MediaRouter.class, "sStatic", null); in reset()
|
D | ShadowSubscriptionManager.java | 19 import org.robolectric.util.ReflectionHelpers; 242 ReflectionHelpers.callConstructor(SubscriptionInfo.class); 253 ReflectionHelpers.setField(subscriptionInfo, "mId", id); in setId() 258 ReflectionHelpers.setField(subscriptionInfo, "mIccId", iccId); in setIccId() 263 ReflectionHelpers.setField(subscriptionInfo, "mSimSlotIndex", index); in setSimSlotIndex() 268 ReflectionHelpers.setField(subscriptionInfo, "mDisplayName", name); in setDisplayName() 273 ReflectionHelpers.setField(subscriptionInfo, "mCarrierName", carrierName); in setCarrierName() 278 ReflectionHelpers.setField(subscriptionInfo, "mIconTint", iconTint); in setIconTint() 283 ReflectionHelpers.setField(subscriptionInfo, "mNumber", number); in setNumber() 288 ReflectionHelpers.setField(subscriptionInfo, "mDataRoaming", dataRoaming); in setDataRoaming() [all …]
|
D | ShadowQueuedWork.java | 10 import org.robolectric.util.ReflectionHelpers; 21 ReflectionHelpers.setStaticField(QueuedWork.class, "sSingleThreadExecutor", null); in reset() 26 Handler queuedWorkHandler = ReflectionHelpers.getStaticField(QueuedWork.class, "sHandler"); in resetStateApi26() 30 ((List) ReflectionHelpers.getStaticField(QueuedWork.class, "sFinishers")).clear(); in resetStateApi26() 31 ((List) ReflectionHelpers.getStaticField(QueuedWork.class, "sWork")).clear(); in resetStateApi26() 32 ReflectionHelpers.setStaticField(QueuedWork.class, "mNumWaits", 0); in resetStateApi26()
|
D | ShadowFilter.java | 7 import org.robolectric.util.ReflectionHelpers; 8 import org.robolectric.util.ReflectionHelpers.ClassParameter; 20 filtering = ReflectionHelpers.callInstanceMethod(realObject, "performFiltering", in filter() 24 filtering = ReflectionHelpers.newInstance(forName); in filter() 27 ReflectionHelpers.callInstanceMethod(realObject, "publishResults", in filter() 32 int count = filtering == null ? -1 : (int) ReflectionHelpers.getField(filtering, "count"); in filter()
|
D | ShadowWindowManagerImpl.java | 24 import org.robolectric.util.ReflectionHelpers; 25 import org.robolectric.util.ReflectionHelpers.ClassParameter; 35 Class<?> arg2Type = ReflectionHelpers.loadClass(ShadowWindowManagerImpl.class.getClassLoader(), in configureDefaultDisplayForJBOnly() 38 defaultDisplayJB = ReflectionHelpers.callConstructor(Display.class, in configureDefaultDisplayForJBOnly() 95 ReflectionHelpers.setStaticField( in reset() 98 ReflectionHelpers.newInstance(WindowManagerImpl.class)); in reset() 100 ReflectionHelpers.getStaticField(WindowManagerImpl.class, "sCompatWindowManagers"); in reset()
|
D | ShadowAsyncQueryHandler.java | 11 import org.robolectric.util.ReflectionHelpers; 12 import org.robolectric.util.ReflectionHelpers.ClassParameter; 31 ReflectionHelpers.callInstanceMethod( in startDelete() 42 ReflectionHelpers.callInstanceMethod( in startInsert() 60 ReflectionHelpers.callInstanceMethod( in startQuery() 77 ReflectionHelpers.callInstanceMethod( in startUpdate()
|
D | ShadowAccessibilityManager.java | 24 import org.robolectric.util.ReflectionHelpers; 25 import org.robolectric.util.ReflectionHelpers.ClassParameter; 64 new Object[]{context, ReflectionHelpers.createNullProxy(IAccessibilityManager.class), 0}); in createInstance() 65 …ReflectionHelpers.setField(accessibilityManager, "mHandler", new MyHandler(context.getMainLooper()… in createInstance() 69 …ReflectionHelpers.setField(accessibilityManager, "mHandler", new MyHandler(context.getMainLooper()… in createInstance() 121 ReflectionHelpers.setField(realAccessibilityManager, "mIsEnabled", enabled); in setEnabled() 170 …ReflectionHelpers.callInstanceMethod(accessibilityManager, "setState", ClassParameter.from(int.cla… in handleMessage()
|
D | ShadowTypedArray.java | 25 import org.robolectric.util.ReflectionHelpers; 26 import org.robolectric.util.ReflectionHelpers.ClassParameter; 38 typedArray = ReflectionHelpers.callConstructor(TypedArray.class, in create() 40 ReflectionHelpers.setField(typedArray, "mData", data); in create() 41 ReflectionHelpers.setField(typedArray, "mLength", len); in create() 42 ReflectionHelpers.setField(typedArray, "mIndices", indices); in create() 44 typedArray = ReflectionHelpers.callConstructor(TypedArray.class, in create() 86 int[] data = ReflectionHelpers.getField(typedArray, "mData"); in dump()
|
D | ShadowLocaleData.java | 15 import org.robolectric.util.ReflectionHelpers; 73 ReflectionHelpers.setField(localeData, "timeFormat12", "h:mm a"); in setEnUsLocaleData() 74 ReflectionHelpers.setField(localeData, "timeFormat24", "HH:mm"); in setEnUsLocaleData() 92 ReflectionHelpers.setField(localeData, "percent", '%'); in setEnUsLocaleData() 100 ReflectionHelpers.setField(localeData, "perMill", '‰'); in setEnUsLocaleData() 110 ReflectionHelpers.setField(localeData, "minusSign", '-'); in setEnUsLocaleData()
|
D | ShadowBackgroundThread.java | 8 import org.robolectric.util.ReflectionHelpers; 15 … BackgroundThread instance = ReflectionHelpers.getStaticField(BackgroundThread.class, "sInstance"); in reset() 18 ReflectionHelpers.setStaticField(BackgroundThread.class, "sInstance", null); in reset() 19 ReflectionHelpers.setStaticField(BackgroundThread.class, "sHandler", null); in reset()
|
D | ShadowPolicyManager.java | 9 import org.robolectric.util.ReflectionHelpers; 10 import org.robolectric.util.ReflectionHelpers.ClassParameter; 23 ReflectionHelpers.loadClass( in makeNewLayoutInflater() 26 return ReflectionHelpers.callConstructor( in makeNewLayoutInflater()
|
D | ShadowResourcesManager.java | 11 import org.robolectric.util.ReflectionHelpers; 12 import org.robolectric.util.ReflectionHelpers.ClassParameter; 20 ReflectionHelpers.setStaticField(ResourcesManager.class, "sResourcesManager", null); in reset() 28 return ReflectionHelpers.callInstanceMethod(realResourcesManager, in callApplyConfigurationToResourcesLocked()
|
D | ShadowBitmapRegionDecoder.java | 19 import org.robolectric.util.ReflectionHelpers; 78 return ReflectionHelpers.callConstructor(BitmapRegionDecoder.class, in newInstance() 79 new ReflectionHelpers.ClassParameter<>(long.class, 0L)); in newInstance() 81 return ReflectionHelpers.callConstructor(BitmapRegionDecoder.class, in newInstance() 82 new ReflectionHelpers.ClassParameter<>(int.class, 0)); in newInstance()
|
D | ShadowContextImpl.java | 38 import org.robolectric.util.ReflectionHelpers; 39 import org.robolectric.util.ReflectionHelpers.ClassParameter; 282 ReflectionHelpers.loadClass( in reset() 284 ReflectionHelpers.setStaticField(contextImplClass, prefsCacheFieldName, prefsDefaultValue); in reset() 288 ReflectionHelpers.getStaticField(contextImplClass, "SYSTEM_SERVICE_MAP"); in reset() 290 ReflectionHelpers.loadClass( in reset() 296 ReflectionHelpers.setField(staticServiceFetcherClass, o, "mCachedInstance", null); in reset() 302 ReflectionHelpers.loadClass( in reset() 306 ReflectionHelpers.setField( in reset()
|
D | ShadowValueAnimator.java | 13 import org.robolectric.util.ReflectionHelpers; 35 ReflectionHelpers.getStaticField(AnimationHandler.class, "sAnimatorHandler"); in reset() 38 ReflectionHelpers.callStaticMethod(ValueAnimator.class, "clearAllAnimations"); in reset() 40 ReflectionHelpers.getStaticField(ValueAnimator.class, "sAnimationHandler"); in reset()
|
/external/robolectric-shadows/shadowapi/src/test/java/org/robolectric/util/ |
D | ReflectionHelpersTest.java | 10 import org.robolectric.util.ReflectionHelpers.ClassParameter; 19 assertThat((int) ReflectionHelpers.getField(example, "overridden")).isEqualTo(5); in getFieldReflectively_getsPrivateFields() 26 assertThat((int) ReflectionHelpers.getField(example, "notOverridden")).isEqualTo(6); in getFieldReflectively_getsInheritedFields() 33 ReflectionHelpers.getField(example, "nonExistent"); in getFieldReflectively_givesHelpfulExceptions() 46 ReflectionHelpers.setField(example, "overridden", 10); in setFieldReflectively_setsPrivateFields() 54 ReflectionHelpers.setField(example, "notOverridden", 10); in setFieldReflectively_setsInheritedFields() 62 ReflectionHelpers.setField(example, "nonExistent", 6); in setFieldReflectively_givesHelpfulExceptions() 75 int result = ReflectionHelpers.getStaticField(field); in getStaticFieldReflectively_withField_getsStaticField() 81 assertThat((int) ReflectionHelpers.getStaticField(ExampleDescendant.class, "DESCENDANT")) in getStaticFieldReflectively_withFieldName_getsStaticField() 88 int startingValue = ReflectionHelpers.getStaticField(field); in setStaticFieldReflectively_withField_setsStaticFields() [all …]
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/android/controller/ |
D | ActivityController.java | 7 import static org.robolectric.util.ReflectionHelpers.ClassParameter.from; 26 import org.robolectric.util.ReflectionHelpers; 131 ReflectionHelpers.setField(component, "mDecor", component.getWindow().getDecorView()); in visible() 132 ReflectionHelpers.callInstanceMethod(component, "makeVisible"); in visible() 163 ReflectionHelpers.callInstanceMethod(root, "windowFocusChanged", in windowFocusChanged() 271 ReflectionHelpers.callInstanceMethod(Activity.class, component, "onConfigurationChanged", in configurationChange() 279 final T recreatedActivity = (T) ReflectionHelpers.callConstructor(component.getClass()); in configurationChange() 286 ReflectionHelpers.setField( in configurationChange() 288 ReflectionHelpers.setField( in configurationChange() 296 ReflectionHelpers.callInstanceMethod(Activity.class, component, "performPause"); in configurationChange() [all …]
|
/external/robolectric-shadows/sandbox/src/main/java/org/robolectric/internal/bytecode/ |
D | ShadowImpl.java | 4 import org.robolectric.util.ReflectionHelpers; 24 return ReflectionHelpers.callConstructor(clazz); in newInstanceOf() 28 …return ReflectionHelpers.callConstructor(clazz, ReflectionHelpers.ClassParameter.fromComponentList… in newInstance() 44 …ectlyOn(Object shadowedObject, String clazzName, String methodName, ReflectionHelpers.ClassParamet… in directlyOn() 54 …public <R, T> R directlyOn(T shadowedObject, Class<T> clazz, String methodName, ReflectionHelpers.… in directlyOn() 56 …return (R) ReflectionHelpers.callInstanceMethod(clazz, shadowedObject, directMethodName, paramValu… in directlyOn() 60 …public <R, T> R directlyOn(Class<T> clazz, String methodName, ReflectionHelpers.ClassParameter... … in directlyOn() 62 return (R) ReflectionHelpers.callStaticMethod(clazz, directMethodName, paramValues); in directlyOn() 66 …public <R> R invokeConstructor(Class<? extends R> clazz, R instance, ReflectionHelpers.ClassParame… in invokeConstructor() 69 return (R) ReflectionHelpers.callInstanceMethod(clazz, instance, directMethodName, paramValues); in invokeConstructor()
|
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/ |
D | Robolectric.java | 26 import org.robolectric.util.ReflectionHelpers; 36 return ServiceController.of(ReflectionHelpers.callConstructor(serviceClass), intent); in buildService() 48 return IntentServiceController.of(ReflectionHelpers.callConstructor(serviceClass), intent); in buildIntentService() 56 return ContentProviderController.of(ReflectionHelpers.callConstructor(contentProviderClass)); in buildContentProvider() 72 return ActivityController.of(ReflectionHelpers.callConstructor(activityClass), intent); in buildActivity() 80 return FragmentController.of(ReflectionHelpers.callConstructor(fragmentClass)); in buildFragment() 85 return FragmentController.of(ReflectionHelpers.callConstructor(fragmentClass), arguments); in buildFragment() 90 return FragmentController.of(ReflectionHelpers.callConstructor(fragmentClass), activityClass); in buildFragment() 94 return FragmentController.of(ReflectionHelpers.callConstructor(fragmentClass), intent); in buildFragment() 100 … return FragmentController.of(ReflectionHelpers.callConstructor(fragmentClass), intent, arguments); in buildFragment() [all …]
|
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/android/internal/ |
D | ParallelUniverse.java | 6 import static org.robolectric.util.ReflectionHelpers.ClassParameter.from; 64 import org.robolectric.util.ReflectionHelpers; 77 ReflectionHelpers.setStaticField(RuntimeEnvironment.class, "apiLevel", sdkConfig.getApiLevel()); in setSdkConfig() 88 ReflectionHelpers.setStaticField(RuntimeEnvironment.class, "apiLevel", sdkConfig.getApiLevel()); in setUpApplicationState() 121 ActivityThread activityThread = ReflectionHelpers.newInstance(ActivityThread.class); in setUpApplicationState() 173 ReflectionHelpers.loadClass( in setUpApplicationState() 176 ReflectionHelpers.setField(activityThread, "mCompatConfiguration", configuration); in setUpApplicationState() 177 ReflectionHelpers in setUpApplicationState() 186 Context systemContextImpl = ReflectionHelpers.callStaticMethod(contextImplClass, in setUpApplicationState() 203 Object data = ReflectionHelpers.newInstance(appBindDataClass); in setUpApplicationState() [all …]
|
/external/robolectric-shadows/shadowapi/src/main/java/org/robolectric/internal/ |
D | IShadow.java | 3 import org.robolectric.util.ReflectionHelpers; 16 …<R> R directlyOn(Object shadowedObject, String clazzName, String methodName, ReflectionHelpers.Cla… in directlyOn() 18 …<R, T> R directlyOn(T shadowedObject, Class<T> clazz, String methodName, ReflectionHelpers.ClassPa… in directlyOn() 20 …<R, T> R directlyOn(Class<T> clazz, String methodName, ReflectionHelpers.ClassParameter... paramVa… in directlyOn() 22 …<R> R invokeConstructor(Class<? extends R> clazz, R instance, ReflectionHelpers.ClassParameter... … in invokeConstructor()
|