public class ConstraintViolationException extends ViolationException
Constructor and Description |
---|
ConstraintViolationException(Constraint<?> constraint,
ValidationContext<?> context,
Object value)
Constructs a new
ConstraintViolationException with the
specified constraint, context and invalid value. |
ConstraintViolationException(Constraint<?> constraint,
ValidationContext<?> context,
Object value,
Throwable cause)
Constructs a new
ConstraintViolationException with the
specified constraint, context, invalid value and cause. |
Modifier and Type | Method and Description |
---|---|
Constraint<?> |
getConstraint()
Returns constraint that is source of this exception.
|
getComponent, getElementName, getElementType, getEntityType, getInvalidIndex, getInvalidTarget, getInvalidType, getInvalidValue, getLeafEntity, getRootEntity
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ConstraintViolationException(Constraint<?> constraint, ValidationContext<?> context, Object value)
ConstraintViolationException
with the
specified constraint, context and invalid value.constraint
- Constraint that is source of this exception.context
- Validation context.value
- Invalid value.public ConstraintViolationException(Constraint<?> constraint, ValidationContext<?> context, Object value, Throwable cause)
ConstraintViolationException
with the
specified constraint, context, invalid value and cause.constraint
- Constraint that is source of this exception.context
- Validation context.value
- Invalid value.cause
- Cause to be wrapped.public Constraint<?> getConstraint()
Copyright © 2011–2020 FoxLabs. All rights reserved.