public class MethodConstraintViolationImpl<T> extends ConstraintViolationImpl<T> implements MethodConstraintViolation<T>
MethodConstraintViolation.Kind
Constructor and Description |
---|
MethodConstraintViolationImpl(String messageTemplate,
String interpolatedMessage,
Method method,
Integer parameterIndex,
String parameterName,
Class<T> rootBeanClass,
T rootBean,
Object leafBeanInstance,
Object value,
Path propertyPath,
ConstraintDescriptor<?> constraintDescriptor,
ElementType elementType) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
MethodConstraintViolation.Kind |
getKind()
Returns the kind of this method constraint violation.
|
Method |
getMethod()
Returns the method during which's validation this constraint violation
occurred.
|
Integer |
getParameterIndex()
Returns the index of the parameter holding the constraint which caused
this constraint violation.
|
String |
getParameterName()
Returns the name of the parameter holding the constraint which caused
this constraint violation.
|
int |
hashCode() |
String |
toString() |
getConstraintDescriptor, getInvalidValue, getLeafBean, getMessage, getMessageTemplate, getPropertyPath, getRootBean, getRootBeanClass
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getConstraintDescriptor, getInvalidValue, getLeafBean, getMessage, getMessageTemplate, getPropertyPath, getRootBean, getRootBeanClass
public MethodConstraintViolationImpl(String messageTemplate, String interpolatedMessage, Method method, Integer parameterIndex, String parameterName, Class<T> rootBeanClass, T rootBean, Object leafBeanInstance, Object value, Path propertyPath, ConstraintDescriptor<?> constraintDescriptor, ElementType elementType)
public Method getMethod()
MethodConstraintViolation
getMethod
in interface MethodConstraintViolation<T>
public Integer getParameterIndex()
MethodConstraintViolation
getParameterIndex
in interface MethodConstraintViolation<T>
MethodConstraintViolation.Kind.PARAMETER
.public String getParameterName()
MethodConstraintViolation
Returns the name of the parameter holding the constraint which caused this constraint violation.
Currently a synthetic name following the form "arg" + index
will be returned, e.g. "arg0"
. In future versions it might
be possible to specify real parameter names, e.g. using an
annotation-based approach around javax.inject.Named
.
getParameterName
in interface MethodConstraintViolation<T>
MethodConstraintViolation.Kind.PARAMETER
.public MethodConstraintViolation.Kind getKind()
MethodConstraintViolation
getKind
in interface MethodConstraintViolation<T>
public int hashCode()
hashCode
in class ConstraintViolationImpl<T>
public boolean equals(Object obj)
equals
in class ConstraintViolationImpl<T>
public String toString()
toString
in class ConstraintViolationImpl<T>
Copyright © 2018 JBoss by Red Hat. All rights reserved.