public class ViolationException extends IllegalArgumentException
ValidationException
,
Serialized FormConstructor and Description |
---|
ViolationException(Validation<?> component,
ValidationContext<?> context,
Object value)
Constructs a new
ViolationException with the specified
validation component, context and invalid value. |
ViolationException(Validation<?> component,
ValidationContext<?> context,
Object value,
Throwable cause)
Constructs a new
ViolationException with the specified
validation component, context, invalid value and cause. |
Modifier and Type | Method and Description |
---|---|
Validation<?> |
getComponent()
Returns validation component that is source of this exception.
|
String |
getElementName()
Returns name of the element defined on the entity.
|
Class<?> |
getElementType()
Returns type of the element defined on the entity.
|
Class<?> |
getEntityType()
Returns type of the entity.
|
Object |
getInvalidIndex()
Returns index of the invalid value.
|
ValidationTarget |
getInvalidTarget()
Returns validation target of the invalid value.
|
Class<?> |
getInvalidType()
Returns type of the invalid value.
|
Object |
getInvalidValue()
Returns invalid value.
|
Object |
getLeafEntity()
Returns leaf entity being validated.
|
Object |
getRootEntity()
Returns root entity being validated.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ViolationException(Validation<?> component, ValidationContext<?> context, Object value)
ViolationException
with the specified
validation component, context and invalid value.component
- Validation component that is source of this exception.context
- Validation context.value
- Invalid value.public ViolationException(Validation<?> component, ValidationContext<?> context, Object value, Throwable cause)
ViolationException
with the specified
validation component, context, invalid value and cause.component
- Validation component that is source of this exception.context
- Validation context.value
- Invalid value.cause
- Cause to be wrapped.public Validation<?> getComponent()
public Class<?> getEntityType()
public Class<?> getElementType()
public String getElementName()
public Object getRootEntity()
public Object getLeafEntity()
public Class<?> getInvalidType()
public ValidationTarget getInvalidTarget()
public Object getInvalidIndex()
public Object getInvalidValue()
Copyright © 2011–2020 FoxLabs. All rights reserved.