org.fuin.objects4j
Class ContractViolationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.fuin.objects4j.ContractViolationException
All Implemented Interfaces:
Serializable

public final class ContractViolationException
extends RuntimeException

The contract that was checked is violated.

See Also:
Serialized Form

Constructor Summary
ContractViolationException(String message)
          Constructor with error message.
ContractViolationException(String message, Set<javax.validation.ConstraintViolation<Object>> constraintViolations)
          Constructor with error message and constraint violations.
 
Method Summary
 Set<javax.validation.ConstraintViolation<Object>> getConstraintViolations()
          Returns the constraint violations.
 
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

ContractViolationException

public ContractViolationException(String message)
Constructor with error message.

Parameters:
message - Message.

ContractViolationException

public ContractViolationException(String message,
                                  Set<javax.validation.ConstraintViolation<Object>> constraintViolations)
Constructor with error message and constraint violations.

Parameters:
message - Message.
constraintViolations - Constraint violations.
Method Detail

getConstraintViolations

public final Set<javax.validation.ConstraintViolation<Object>> getConstraintViolations()
Returns the constraint violations.

Returns:
Immutable set of constraint violations or null if only a message is available.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.