Package org.junit.validator
Class AnnotationValidator
java.lang.Object
org.junit.validator.AnnotationValidator
- Direct Known Subclasses:
CategoryValidator
,OrderWithValidator
Validates annotations on classes and methods. To be validated,
an annotation should be annotated with
ValidateWith
Instances of this class are shared by multiple test runners, so they should
be immutable and thread-safe.- Since:
- 4.12
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidateAnnotatedClass
(TestClass testClass) Validates annotation on the given class.Validates annotation on the given field.Validates annotation on the given method.
-
Field Details
-
NO_VALIDATION_ERRORS
-
-
Constructor Details
-
AnnotationValidator
public AnnotationValidator()
-
-
Method Details
-
validateAnnotatedClass
Validates annotation on the given class.- Parameters:
testClass
- that is being validated- Returns:
- A list of exceptions. Default behavior is to return an empty list.
- Since:
- 4.12
-
validateAnnotatedField
Validates annotation on the given field.- Parameters:
field
- that is being validated- Returns:
- A list of exceptions. Default behavior is to return an empty list.
- Since:
- 4.12
-
validateAnnotatedMethod
Validates annotation on the given method.- Parameters:
method
- that is being validated- Returns:
- A list of exceptions. Default behavior is to return an empty list.
- Since:
- 4.12
-