aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/validator/ValidateWith.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/junit/validator/ValidateWith.java')
-rw-r--r--src/main/java/org/junit/validator/ValidateWith.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/org/junit/validator/ValidateWith.java b/src/main/java/org/junit/validator/ValidateWith.java
new file mode 100644
index 0000000..03d7906
--- /dev/null
+++ b/src/main/java/org/junit/validator/ValidateWith.java
@@ -0,0 +1,19 @@
+package org.junit.validator;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Allows for an {@link AnnotationValidator} to be attached to an annotation.
+ *
+ * <p>When attached to an annotation, the validator will be instantiated and invoked
+ * by the {@link org.junit.runners.ParentRunner}.</p>
+ *
+ * @since 4.12
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface ValidateWith {
+ Class<? extends AnnotationValidator> value();
+}