{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

CustomFilter

@Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)  @Target(value = [java.lang.annotation.ElementType.ANNOTATION_TYPE]) annotation CustomFilter


Custom test filters for Android tests.

To add a custom filter to your android test, create an annotation and use @CustomFilter to specify a filter implementation class, which must extend AbstractFilter and handle the test annotation that @CustomFilter is being added to. For example:


public @interface MyCustomFilterAnnotation {}

This API is experimental and subject to change or removal.

Summary

Public methods

abstract Class<AbstractFilter>

Public methods

filterClass

public abstract Class<AbstractFilterfilterClass()