org.hibernate.validator.internal.engine
Class MethodConstraintViolationImpl<T>
java.lang.Object
org.hibernate.validator.internal.engine.ConstraintViolationImpl<T>
org.hibernate.validator.internal.engine.MethodConstraintViolationImpl<T>
- All Implemented Interfaces:
- Serializable, javax.validation.ConstraintViolation<T>, MethodConstraintViolation<T>
public class MethodConstraintViolationImpl<T>
- extends ConstraintViolationImpl<T>
- implements MethodConstraintViolation<T>
- Author:
- Gunnar Morling
- See Also:
- Serialized Form
|
Constructor Summary |
MethodConstraintViolationImpl(String messageTemplate,
String interpolatedMessage,
Method method,
Integer parameterIndex,
String parameterName,
Class<T> rootBeanClass,
T rootBean,
Object leafBeanInstance,
Object value,
javax.validation.Path propertyPath,
javax.validation.metadata.ConstraintDescriptor<?> constraintDescriptor,
ElementType elementType)
|
| Methods inherited from interface javax.validation.ConstraintViolation |
getConstraintDescriptor, getInvalidValue, getLeafBean, getMessage, getMessageTemplate, getPropertyPath, getRootBean, getRootBeanClass |
MethodConstraintViolationImpl
public MethodConstraintViolationImpl(String messageTemplate,
String interpolatedMessage,
Method method,
Integer parameterIndex,
String parameterName,
Class<T> rootBeanClass,
T rootBean,
Object leafBeanInstance,
Object value,
javax.validation.Path propertyPath,
javax.validation.metadata.ConstraintDescriptor<?> constraintDescriptor,
ElementType elementType)
getMethod
public Method getMethod()
- Description copied from interface:
MethodConstraintViolation
- Returns the method during which's validation this constraint violation
occurred.
- Specified by:
getMethod in interface MethodConstraintViolation<T>
- Returns:
- The method during which's validation this constraint violation
occurred.
getParameterIndex
public Integer getParameterIndex()
- Description copied from interface:
MethodConstraintViolation
- Returns the index of the parameter holding the constraint which caused
this constraint violation.
- Specified by:
getParameterIndex in interface MethodConstraintViolation<T>
- Returns:
- The index of the parameter holding the constraint which caused
this constraint violation or null if this constraint violation is
not of
MethodConstraintViolation.Kind.PARAMETER.
getParameterName
public String getParameterName()
- Description copied from interface:
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.
- Specified by:
getParameterName in interface MethodConstraintViolation<T>
- Returns:
- The name of the parameter holding the constraint which caused
this constraint violation or null if this constraint violation is
not of
MethodConstraintViolation.Kind.PARAMETER.
getKind
public MethodConstraintViolation.Kind getKind()
- Description copied from interface:
MethodConstraintViolation
- Returns the kind of this method constraint violation.
- Specified by:
getKind in interface MethodConstraintViolation<T>
- Returns:
- The kind of this method constraint violation.
hashCode
public int hashCode()
- Overrides:
hashCode in class ConstraintViolationImpl<T>
equals
public boolean equals(Object obj)
- Overrides:
equals in class ConstraintViolationImpl<T>
toString
public String toString()
- Overrides:
toString in class ConstraintViolationImpl<T>
Copyright © 2012 Oracle Corporation. All Rights Reserved.