Home | History | Annotate | Download | only in annotation
      1 /*
      2  * Copyright (C) 2008 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package dalvik.annotation;
     18 
     19 import java.lang.annotation.ElementType;
     20 import java.lang.annotation.Retention;
     21 import java.lang.annotation.RetentionPolicy;
     22 import java.lang.annotation.Target;
     23 
     24 /**
     25  * Defines an annotation used be used within the TestInfo annotation. It
     26  * specifies a single method target for the test (but can be used multiple
     27  * times).
     28  * @hide
     29  */
     30 @Retention(RetentionPolicy.RUNTIME)
     31 @Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
     32 public @interface TestTargetNew {
     33 
     34     /**
     35      * Specifies the name of the API method that is being tested. This field
     36      * may be left empty if the test target is a concept implemented in a
     37      * class rather than a concrete API method.
     38      */
     39     String method() default "";
     40 
     41     /**
     42      * Specifies the signature of the API method that is being tested, in terms
     43      * of Java classes.
     44      */
     45     Class<?>[] args() default {};
     46 
     47     /**
     48      * Specifies the class to which the tested method belongs. If this value is
     49      * not provided, the class identified in @TestTargetClass is used by the
     50      * test progress doclet.
     51      */
     52     Class<?> clazz() default void.class;
     53 
     54     /**
     55      * Specifies the level of coverage the tested API method has.
     56      */
     57     TestLevel level();
     58 
     59     /**
     60      * Specifies noteworthy plain-text information about the test, for example
     61      * if something is NOT covered by the test method.
     62      */
     63     String notes() default "";
     64 }
     65