org.hibernate.validator.engine
Class MethodConstraintViolationImpl<T>
java.lang.Object
org.hibernate.validator.engine.ConstraintViolationImpl<T>
org.hibernate.validator.engine.MethodConstraintViolationImpl<T>
- All Implemented Interfaces:
- Serializable, 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,
Path propertyPath,
ConstraintDescriptor<?> constraintDescriptor,
ElementType elementType)
|
MethodConstraintViolationImpl
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)
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 © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved