Package org.robolectric.annotation
Annotation Type Implements
-
@Documented @Retention(RUNTIME) @Target(TYPE) public @interface Implements
Indicates that a class declaration is intended to shadow an Android class declaration. The Robolectric runtime searches classes with this annotation for methods with theImplementationannotation and calls them in place of the methods on the Android class.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancallThroughByDefaultIf true, Robolectric will invoke the actual Android code for any method that isn't shadowed.StringclassNameAndroid class name (if the Class object is not accessible).booleanisInAndroidSdkDenotes that this type exists in the public Android SDK.booleanlooseSignaturesIf true, when an exact method signature match isn't found, Robolectric will look for a method with the same name but with all argument types replaced with java.lang.Object.intmaxSdkIf specified, the shadow class will be applied only for this SDK or lesser.intminSdkIf specified, the shadow class will be applied only for this SDK or greater.Class<? extends ShadowPicker<?>>shadowPickerIf specified, thepickerwill be instantiated and called from within the newly-created Robolectric classloader.Class<?>valueThe Android class to be shadowed.
-
-
-
Element Detail
-
value
Class<?> value
The Android class to be shadowed.- Returns:
- Android class to shadow.
- Default:
- void.class
-
-
-
className
String className
Android class name (if the Class object is not accessible).- Returns:
- Android class name.
- Default:
- ""
-
-
-
shadowPicker
Class<? extends ShadowPicker<?>> shadowPicker
If specified, thepickerwill be instantiated and called from within the newly-created Robolectric classloader. All shadow classes implementing the same Android class must use the sameShadowPicker.- Default:
- org.robolectric.annotation.Implements.DefaultShadowPicker.class
-
-