public interface InvalidElement extends Element
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
invalidValue()
Returns the invalid value.
|
boolean |
isConstraintViolated(java.lang.Class<? extends java.lang.annotation.Annotation> constraint) |
java.lang.annotation.Annotation |
violatedConstraint(java.lang.Class<? extends java.lang.annotation.Annotation> constraint) |
java.util.Collection<java.lang.annotation.Annotation> |
violatedConstraints()
Returns a list of the annotation that defines constraints violated by this
element.
|
declaringClass, in, isReadable, isSpecific, isWritable, name, set, target, type, value
java.lang.Object invalidValue()
Note that this method may not return the same value as Element.value()
because the element value may change after the validation.
java.util.Collection<java.lang.annotation.Annotation> violatedConstraints()
The annotations can be used to create validation messages.
java.lang.annotation.Annotation violatedConstraint(java.lang.Class<? extends java.lang.annotation.Annotation> constraint)
constraint
- the constraint annotation typenull
if the constraint
is not present in the element or it was not violated.boolean isConstraintViolated(java.lang.Class<? extends java.lang.annotation.Annotation> constraint)
constraint
- the constraint annotation typetrue
if the given constraint is violated in this
element or false
if is not defined or violated.