Package org.robolectric.annotation
Annotation Type Implementation
Indicates that a method declaration is intended to shadow a method with the same signature on the
 associated Android class.
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionintThe annotated shadow method will be invoked only for the specified SDK or lesser.The implemented method name.intThe annotated shadow method will be invoked only for the specified SDK or greater.
- 
Field SummaryFields
- 
Field Details- 
DEFAULT_SDKstatic final int DEFAULT_SDK- See Also:
 
 
- 
- 
Element Details- 
minSdkint minSdkThe annotated shadow method will be invoked only for the specified SDK or greater.- Default:
- -1
 
- 
maxSdkint maxSdkThe annotated shadow method will be invoked only for the specified SDK or lesser.- Default:
- -1
 
- 
methodNameString methodNameThe implemented method name.Sometimes internal methods return different types for different SDKs. It's safe because these methods are internal/private methods, not public methods. To support different return types of a method for different SDKs, we often use looseSignature method, although all return types are common types like bool and int. This field/property can be used to fix this issue by using different real methods for different SDKs. - Returns:
- The expected implemented method name. If it is empty/null, the Robolectric will uses the method's name that marked by @Implementation as the implemented method name.
 - Default:
- ""
 
 
-