org.qi4j.library.constraints
Class InstanceOfConstraint

java.lang.Object
  extended by org.qi4j.library.constraints.InstanceOfConstraint
All Implemented Interfaces:
Serializable, Constraint<InstanceOf,Object>

public class InstanceOfConstraint
extends Object
implements Constraint<InstanceOf,Object>

JAVADOC

See Also:
Serialized Form

Constructor Summary
InstanceOfConstraint()
           
 
Method Summary
 boolean isValid(InstanceOf annotation, Object parameter)
          For each value or parameter which should be checked this method will be invoked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceOfConstraint

public InstanceOfConstraint()
Method Detail

isValid

public boolean isValid(InstanceOf annotation,
                       Object parameter)
                throws NullPointerException
Description copied from interface: Constraint
For each value or parameter which should be checked this method will be invoked. If the method returns true the value is valid. If it returns false the value is considered invalid. When all constraints have been checked a ConstraintViolationException will be thrown with all the constraint violations that were found.

Specified by:
isValid in interface Constraint<InstanceOf,Object>
Parameters:
annotation - the annotation to match
parameter - the value to be checked
Returns:
true if valid, false if invalid
Throws:
NullPointerException