Annotation Type Filter


@Documented @Retention(RUNTIME) @Target(METHOD) @Beta public @interface Filter
Indicates that a method declaration is intended to be called before or after the original method with the same signature on the associated Android class.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Describes the order in which a filter method should be invoked relative to the original method.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    The annotated filter method will be invoked only for the specified SDK or lesser.
    The filtered method name.
    int
    The annotated filter method will be invoked only for the specified SDK or greater.
    The order in which the filter should be invoked.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Field Details

  • Element Details

    • order

      The order in which the filter should be invoked.
      Default:
      BEFORE
    • minSdk

      int minSdk
      The annotated filter method will be invoked only for the specified SDK or greater.
      Default:
      -1
    • maxSdk

      int maxSdk
      The annotated filter method will be invoked only for the specified SDK or lesser.
      Default:
      -1
    • methodName

      String methodName
      The filtered method name.
      Returns:
      The expected filtered method name. If it is empty, the Robolectric will use the method name that is marked by @Filter.
      Default:
      ""