jfun.yan.xml.nuts
Class CollectionNut

java.lang.Object
  extended by jfun.yan.xml.nut.Nut
      extended by jfun.yan.xml.nut.ComponentNut
          extended by jfun.yan.xml.nuts.CollectionNut
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ArrayNut, ListNut, SetNut

public abstract class CollectionNut
extends ComponentNut

Any Nut that instantiates linear collection such as java.util.Collection, array or any other non-standard linear collection.

Author:
Ben Yu Nov 30, 2005 10:41:45 PM
See Also:
Serialized Form

Constructor Summary
CollectionNut()
           
 
Method Summary
 Component[] getElements()
           
 Component[] getMandatoryElements()
          Get the mandatory elements.
 java.lang.Class getOf()
           
 java.lang.Class getType()
           
 java.lang.Class getType(java.lang.Class deftype)
          get the type attribute.
 void set(Component[] ccs)
           
 void setElements(Component[] ccs)
           
 void setOf(java.lang.Class etype)
           
 void setType(java.lang.Class type)
           
 
Methods inherited from class jfun.yan.xml.nut.ComponentNut
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

CollectionNut

public CollectionNut()
Method Detail

setType

public void setType(java.lang.Class type)

getType

public java.lang.Class getType()

getType

public java.lang.Class getType(java.lang.Class deftype)
get the type attribute.

Parameters:
deftype - The default type if the type is not set.
Returns:
the type.

setOf

public void setOf(java.lang.Class etype)

getOf

public java.lang.Class getOf()

setElements

public void setElements(Component[] ccs)

set

public void set(Component[] ccs)

getMandatoryElements

public Component[] getMandatoryElements()
Get the mandatory elements. Conversion is done if necessary.


getElements

public Component[] getElements()