Class ConstraintCheckIssue
java.lang.Object
org.hibernate.validator.ap.internal.checks.ConstraintCheckIssue
The result of the execution of a
ConstraintCheck. Comprises
information about the location at which the issue occurred and a message
describing the occurred issue.- Author:
- Gunnar Morling
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConstraintCheckIssue(Element element, AnnotationMirror annotationMirror, ConstraintCheckIssue.IssueKind kind, String messageKey, Object... messageParameters) Creates a new ConstraintCheckIssue. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ConstraintCheckIssueerror(Element element, AnnotationMirror annotationMirror, String messageKey, Object... messageParameters) Creates a new ConstraintCheckIssue of error kind (ConstraintCheckIssue.IssueKind.ERROR).getKind()Object[]inthashCode()booleanisError()Determine if issue is an errorbooleanDetermine if issue is a warningtoString()static ConstraintCheckIssuewarning(Element element, AnnotationMirror annotationMirror, String messageKey, Object... messageParameters) Creates a new ConstraintCheckIssue of warning kind (ConstraintCheckIssue.IssueKind.WARNING).
-
Constructor Details
-
ConstraintCheckIssue
public ConstraintCheckIssue(Element element, AnnotationMirror annotationMirror, ConstraintCheckIssue.IssueKind kind, String messageKey, Object... messageParameters) Creates a new ConstraintCheckIssue.- Parameters:
element- The element at which the error occurred.annotationMirror- The annotation that causes the error.messageKey- A key for retrieving an error message template from the bundleorg.hibernate.validator.ap.ValidationProcessorMessages.messageParameters- An array with values to put into the error message template usingMessageFormat. The number of elements must match the number of place holders in the message template.
-
-
Method Details
-
getElement
-
getAnnotationMirror
-
getKind
-
getMessageKey
-
getMessageParameters
-
isError
public boolean isError()Determine if issue is an error- Returns:
- true if
getKind()equals toConstraintCheckIssue.IssueKind.ERROR
-
isWarning
public boolean isWarning()Determine if issue is a warning- Returns:
- true if
getKind()equals toConstraintCheckIssue.IssueKind.WARNING
-
error
public static ConstraintCheckIssue error(Element element, AnnotationMirror annotationMirror, String messageKey, Object... messageParameters) Creates a new ConstraintCheckIssue of error kind (ConstraintCheckIssue.IssueKind.ERROR).- Parameters:
element- The element at which the error occurred.annotationMirror- The annotation that causes the error.messageKey- A key for retrieving an error message template from the bundleorg.hibernate.validator.ap.ValidationProcessorMessages.messageParameters- An array with values to put into the error message template usingMessageFormat. The number of elements must match the number of place holders in the message template.
-
warning
public static ConstraintCheckIssue warning(Element element, AnnotationMirror annotationMirror, String messageKey, Object... messageParameters) Creates a new ConstraintCheckIssue of warning kind (ConstraintCheckIssue.IssueKind.WARNING).- Parameters:
element- The element at which the error occurred.annotationMirror- The annotation that causes the error.messageKey- A key for retrieving an error message template from the bundleorg.hibernate.validator.ap.ValidationProcessorMessages.messageParameters- An array with values to put into the error message template usingMessageFormat. The number of elements must match the number of place holders in the message template.
-
toString
-
hashCode
public int hashCode() -
equals
-