jfun.yan.xml.nuts.optional
Class TypeCaseNut

java.lang.Object
  extended by jfun.yan.xml.nut.Nut
      extended by jfun.yan.xml.nut.BinderNut
          extended by jfun.yan.xml.nuts.optional.TypeCaseNut
All Implemented Interfaces:
java.io.Serializable

public class TypeCaseNut
extends BinderNut

This Nut class creates a typecase tag that evaluates to a Binder object.

Upon receiving a component instance, it checks the type of the instance and runs the proper Binder object defined in the corresponding case that matches the type.

Author:
Ben Yu Nov 10, 2005 12:14:46 AM
See Also:
Serialized Form

Constructor Summary
TypeCaseNut()
           
 
Method Summary
 void addCase(BinderCase cs)
           
 void addDefault(BinderDefault def)
           
 Binder eval()
           
 
Methods inherited from class jfun.yan.xml.nut.Nut
cast, checkDuplicate, checkMandatory, checkMandatory, convert, getComponentClassLoader, getId, getNutClassLoader, getNutEnvironment, getParameterWiring, getPropertyWiring, getSequenceNumber, getTagLocation, getTagName, initGloballyDefined, initNutEnvironment, initSequenceNumber, initTagLocation, initTagName, isGloballyDefined, raise, raise, register, registerEagerInstantiation, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeCaseNut

public TypeCaseNut()
Method Detail

addCase

public void addCase(BinderCase cs)

addDefault

public void addDefault(BinderDefault def)

eval

public Binder eval()
Specified by:
eval in class BinderNut