diff options
Diffstat (limited to 'src/main/java/org/junit/runners/model/Annotatable.java')
-rw-r--r-- | src/main/java/org/junit/runners/model/Annotatable.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/org/junit/runners/model/Annotatable.java b/src/main/java/org/junit/runners/model/Annotatable.java new file mode 100644 index 0000000..8eff6fd --- /dev/null +++ b/src/main/java/org/junit/runners/model/Annotatable.java @@ -0,0 +1,20 @@ +package org.junit.runners.model; + +import java.lang.annotation.Annotation; + +/** + * A model element that may have annotations. + * + * @since 4.12 + */ +public interface Annotatable { + /** + * Returns the model elements' annotations. + */ + Annotation[] getAnnotations(); + + /** + * Returns the annotation on the model element of the given type, or @code{null} + */ + <T extends Annotation> T getAnnotation(Class<T> annotationType); +} |