org.hibernate.validator.method
Class MethodConstraintViolationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.validation.ValidationException
                  extended by org.hibernate.validator.method.MethodConstraintViolationException
All Implemented Interfaces:
Serializable

public class MethodConstraintViolationException
extends ValidationException

Exception class to be thrown by integrators of HV's method level validation feature.

Author:
Gunnar Morling
See Also:
Serialized Form

Constructor Summary
MethodConstraintViolationException(Set<? extends MethodConstraintViolation<?>> constraintViolations)
          Creates a new new MethodConstraintViolationException.
MethodConstraintViolationException(String message, Set<? extends MethodConstraintViolation<?>> constraintViolations)
          Creates a new new MethodConstraintViolationException.
 
Method Summary
 Set<MethodConstraintViolation<?>> getConstraintViolations()
          Set of constraint violations reported during a validation
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodConstraintViolationException

public MethodConstraintViolationException(Set<? extends MethodConstraintViolation<?>> constraintViolations)
Creates a new new MethodConstraintViolationException.

Parameters:
constraintViolations - A set of constraint violations for which this exception shall be created.

MethodConstraintViolationException

public MethodConstraintViolationException(String message,
                                          Set<? extends MethodConstraintViolation<?>> constraintViolations)
Creates a new new MethodConstraintViolationException.

Parameters:
message - The message for the exception to be created.
constraintViolations - A set of constraint violations for which this exception shall be created.
Method Detail

getConstraintViolations

public Set<MethodConstraintViolation<?>> getConstraintViolations()
Set of constraint violations reported during a validation

Returns:
A set of MethodConstraintViolation occurred during a method level validation call.


Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved