org.hibernate.validator.method
Interface MethodConstraintViolation<T>

All Superinterfaces:
javax.validation.ConstraintViolation<T>
All Known Implementing Classes:
MethodConstraintViolationImpl

Deprecated. Will by replaced by equivalent functionality defined by the Bean Validation 1.1 API as of Hibernate Validator 5.

@Deprecated
public interface MethodConstraintViolation<T>
extends javax.validation.ConstraintViolation<T>

Describes the violation of a method-level constraint by providing access to the method/parameter hosting the violated constraint etc.

Author:
Gunnar Morling
See Also:
MethodValidator

Nested Class Summary
static class MethodConstraintViolation.Kind
          Deprecated. Will by replaced by equivalent functionality defined by the Bean Validation 1.1 API as of Hibernate Validator 5.
 
Method Summary
 MethodConstraintViolation.Kind getKind()
          Deprecated. Returns the kind of this method constraint violation.
 Method getMethod()
          Deprecated. Returns the method during which's validation this constraint violation occurred.
 Integer getParameterIndex()
          Deprecated. Returns the index of the parameter holding the constraint which caused this constraint violation.
 String getParameterName()
          Deprecated.  Returns the name of the parameter holding the constraint which caused this constraint violation.
 
Methods inherited from interface javax.validation.ConstraintViolation
getConstraintDescriptor, getInvalidValue, getLeafBean, getMessage, getMessageTemplate, getPropertyPath, getRootBean, getRootBeanClass
 

Method Detail

getMethod

Method getMethod()
Deprecated. 
Returns the method during which's validation this constraint violation occurred.

Returns:
The method during which's validation this constraint violation occurred.

getParameterIndex

Integer getParameterIndex()
Deprecated. 
Returns the index of the parameter holding the constraint which caused this constraint violation.

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

String getParameterName()
Deprecated. 

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.

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

MethodConstraintViolation.Kind getKind()
Deprecated. 
Returns the kind of this method constraint violation.

Returns:
The kind of this method constraint violation.


Copyright © 2012 Oracle Corporation. All Rights Reserved.