org.springmodules.validation.util.condition
Class TypeSpecificCondition

java.lang.Object
  extended by org.springmodules.validation.util.condition.AbstractCondition
      extended by org.springmodules.validation.util.condition.TypeSpecificCondition
All Implemented Interfaces:
Condition
Direct Known Subclasses:
NonNullAcceptingTypeSpecificCondition

public abstract class TypeSpecificCondition
extends AbstractCondition

A base class for all type specific conditions. A type specific instantCondition can only checkCalendar specific object types.

Author:
Uri Boness

Constructor Summary
TypeSpecificCondition(java.lang.Class type)
          Construts a new TypeSpecificCondition with the given supported type.
TypeSpecificCondition(java.lang.Class[] types)
          Constructs a new TypeSpecificCondition with a the give list of supported types.
 
Method Summary
protected  void beforeObjectChecked(java.lang.Object object)
          Checks whether the checked object is of one of the types supported by this condition.
 
Methods inherited from class org.springmodules.validation.util.condition.AbstractCondition
afterObjectChecked, and, check, doCheck, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeSpecificCondition

public TypeSpecificCondition(java.lang.Class type)
Construts a new TypeSpecificCondition with the given supported type. Sub classes should call this constructor if they only support on object type.

Parameters:
type - The object type this condition supports.

TypeSpecificCondition

public TypeSpecificCondition(java.lang.Class[] types)
Constructs a new TypeSpecificCondition with a the give list of supported types. Sub-classes should call this constructor if they support more then one object type.

Parameters:
types - The object types this condition supports.
Method Detail

beforeObjectChecked

protected void beforeObjectChecked(java.lang.Object object)
Checks whether the checked object is of one of the types supported by this condition.

Overrides:
beforeObjectChecked in class AbstractCondition
Parameters:
object - The object to be checked.
Throws:
java.lang.IllegalArgumentException - if the checked object type is not supported by this condition.


Copyright © 2005. All Rights Reserved.