public @interface

UseMonitorFactory

implements java.lang.annotation.Annotation

 androidx.test.jank.annotations.UseMonitorFactory

Gradle dependencies

compile group: 'androidx.test.janktesthelper', name: 'janktesthelper', version: '1.0.1'

  • groupId: androidx.test.janktesthelper
  • artifactId: janktesthelper
  • version: 1.0.1

Artifact androidx.test.janktesthelper:janktesthelper:1.0.1 it located at Google repository (https://maven.google.com/)

Overview

Class annotation used to override the default IMonitorFactory implementation. The factory should have a public constructor that takes an instance as the sole argument.

Summary

Source

/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.test.jank.annotations;

import androidx.test.annotation.Beta;
import androidx.test.jank.IMonitorFactory;
import androidx.test.jank.internal.JankMonitorFactory;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Class annotation used to override the default {@link IMonitorFactory} implementation.
 * The factory should have a public constructor that takes an {@link Instrumentation} instance as
 * the sole argument.
 */
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Target(ElementType.TYPE)
@Beta
public @interface UseMonitorFactory {
    Class<? extends IMonitorFactory> value() default JankMonitorFactory.class;
}