org.carrot2.util.attribute.constraint
Class ConstraintViolationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.carrot2.util.attribute.constraint.ConstraintViolationException
All Implemented Interfaces:
Serializable

public class ConstraintViolationException
extends RuntimeException

An exception thrown when an attempt is made to bind attribute values that do not meet the constraints.

See Also:
Serialized Form

Field Summary
 Annotation[] annotations
          Constraints that were not met by the offendingValue.
 String key
          Key of the involved Attribute as defined in Attribute.key().
 Object offendingValue
          Value that does not meet the constraints.
 
Constructor Summary
ConstraintViolationException(String key, Object offendngValue, Annotation... annotations)
          Creates a new ConstraintViolationException.
 
Method Summary
 String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

offendingValue

public final Object offendingValue
Value that does not meet the constraints.


annotations

public final Annotation[] annotations
Constraints that were not met by the offendingValue.


key

public final String key
Key of the involved Attribute as defined in Attribute.key().

Constructor Detail

ConstraintViolationException

public ConstraintViolationException(String key,
                                    Object offendngValue,
                                    Annotation... annotations)
Creates a new ConstraintViolationException.

Method Detail

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable


Copyright (c) Dawid Weiss, Stanislaw Osinski