public class ConstraintCheckIssue extends Object
ConstraintCheck
. Comprises
information about the location at which the issue occurred and a message
describing the occurred issue.Modifier and Type | Class and Description |
---|---|
static class |
ConstraintCheckIssue.IssueKind |
Constructor and Description |
---|
ConstraintCheckIssue(Element element,
AnnotationMirror annotationMirror,
ConstraintCheckIssue.IssueKind kind,
String messageKey,
Object... messageParameters)
Creates a new ConstraintCheckIssue.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static ConstraintCheckIssue |
error(Element element,
AnnotationMirror annotationMirror,
String messageKey,
Object... messageParameters)
Creates a new ConstraintCheckIssue of error kind (
ConstraintCheckIssue.IssueKind.ERROR ). |
AnnotationMirror |
getAnnotationMirror() |
Element |
getElement() |
ConstraintCheckIssue.IssueKind |
getKind() |
String |
getMessageKey() |
Object[] |
getMessageParameters() |
int |
hashCode() |
boolean |
isError()
Determine if issue is an error
|
boolean |
isWarning()
Determine if issue is a warning
|
String |
toString() |
static ConstraintCheckIssue |
warning(Element element,
AnnotationMirror annotationMirror,
String messageKey,
Object... messageParameters)
Creates a new ConstraintCheckIssue of warning kind (
ConstraintCheckIssue.IssueKind.WARNING ). |
public ConstraintCheckIssue(Element element, AnnotationMirror annotationMirror, ConstraintCheckIssue.IssueKind kind, String messageKey, Object... messageParameters)
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 bundle
org.hibernate.validator.ap.ValidationProcessorMessages.
messageParameters
- An array with values to put into the error message template
using MessageFormat
. The number of elements must match
the number of place holders in the message template.public Element getElement()
public AnnotationMirror getAnnotationMirror()
public ConstraintCheckIssue.IssueKind getKind()
public String getMessageKey()
public Object[] getMessageParameters()
public boolean isError()
getKind()
equals to ConstraintCheckIssue.IssueKind.ERROR
public boolean isWarning()
getKind()
equals to ConstraintCheckIssue.IssueKind.WARNING
public static ConstraintCheckIssue error(Element element, AnnotationMirror annotationMirror, String messageKey, Object... messageParameters)
ConstraintCheckIssue.IssueKind.ERROR
).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 bundle
org.hibernate.validator.ap.ValidationProcessorMessages.
messageParameters
- An array with values to put into the error message template
using MessageFormat
. The number of elements must match
the number of place holders in the message template.public static ConstraintCheckIssue warning(Element element, AnnotationMirror annotationMirror, String messageKey, Object... messageParameters)
ConstraintCheckIssue.IssueKind.WARNING
).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 bundle
org.hibernate.validator.ap.ValidationProcessorMessages.
messageParameters
- An array with values to put into the error message template
using MessageFormat
. The number of elements must match
the number of place holders in the message template.Copyright © 2007-2021 Red Hat, Inc. All Rights Reserved