com.inxar.affirm
Class AffirmType

java.lang.Object
  |
  +--com.inxar.affirm.AbstractAffirmation
        |
        +--com.inxar.affirm.AffirmType
All Implemented Interfaces:
Affirmation

public class AffirmType
extends AbstractAffirmation

Affirmation implementation which checks that the value associated with a certain key has a type compatible with the given Class as determined by the java.lang.Class.isInstance(Object) method.


Fields inherited from class com.inxar.affirm.AbstractAffirmation
isFatal, key, msg
 
Constructor Summary
AffirmType(java.lang.Object key, java.lang.String className)
           
AffirmType(java.lang.Object key, java.lang.String msg, boolean isFatal, java.lang.Class type)
           
AffirmType(java.lang.Object key, java.lang.String msg, java.lang.String className)
           
 
Method Summary
 java.lang.Object affirm(java.lang.Object val)
          Evaluates the given Input for validity.
 
Methods inherited from class com.inxar.affirm.AbstractAffirmation
getKey, isFatal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AffirmType

public AffirmType(java.lang.Object key,
                  java.lang.String msg,
                  boolean isFatal,
                  java.lang.Class type)

AffirmType

public AffirmType(java.lang.Object key,
                  java.lang.String msg,
                  java.lang.String className)
           throws java.lang.Exception

AffirmType

public AffirmType(java.lang.Object key,
                  java.lang.String className)
           throws java.lang.Exception
Method Detail

affirm

public java.lang.Object affirm(java.lang.Object val)
                        throws AffirmationException
Description copied from interface: Affirmation
Evaluates the given Input for validity. If valid, the method should return with an Object to be subsequently included in a Datum and Data container. If invalid, an AffirmationException is thrown which carries out the error message and isFatal flag.