View Javadoc
1   package org.junit.runners.model;
2   
3   import java.lang.annotation.Annotation;
4   
5   /**
6    * A model element that may have annotations.
7    * 
8    * @since 4.12
9    */
10  public interface Annotatable {
11      /**
12       * Returns the model elements' annotations.
13       */
14      Annotation[] getAnnotations();
15  
16      /**
17       * Returns the annotation on the model element of the given type, or @code{null}
18       */
19      <T extends Annotation> T getAnnotation(Class<T> annotationType);
20  }