net.java.quickcheck
Class CharacteristicException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.java.quickcheck.CharacteristicException
All Implemented Interfaces:
Serializable

public class CharacteristicException
extends RuntimeException

Indicates that a characteristic specification was not true for a given instance.

See Also:
Serialized Form

Constructor Summary
CharacteristicException(String message, Throwable cause, Characteristic<?> charateristic)
           
CharacteristicException(String message, Throwable cause, Characteristic<?> charateristic, Object instance)
           
 
Method Summary
 Characteristic<?> getCharateristic()
           
 Object getInstance()
          Instance causing the characteristic violation.
 
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

CharacteristicException

public CharacteristicException(String message,
                               Throwable cause,
                               Characteristic<?> charateristic)
Parameters:
message - error message
cause - causing exception thrown by characteristic
charateristic - characteristic violated

CharacteristicException

public CharacteristicException(String message,
                               Throwable cause,
                               Characteristic<?> charateristic,
                               Object instance)
Parameters:
message - error message
cause - causing exception thrown by characteristic
instance - violating the specified characteristic
charateristic - characteristic violated
Method Detail

getInstance

public Object getInstance()
Instance causing the characteristic violation.

Returns:
the violating instance

getCharateristic

public Characteristic<?> getCharateristic()


Copyright © 2011. All Rights Reserved.