jfun.yan.xml.nuts
Class DelegatingNut

java.lang.Object
  extended by jfun.yan.xml.nut.Nut
      extended by jfun.yan.xml.nut.ComponentNut
          extended by jfun.yan.xml.nuts.DelegatingNut
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BindNut, Case, Default, FactoryNut, FieldNut, GetKeyNut, GetterNut, InjectNut, InstanceOfNut, LifecycleNut, ProxyNut, ServiceNut, SubscriptNut, WithArgumentsNut, WithPropertiesNut

public abstract class DelegatingNut
extends ComponentNut

Super class for any Nut that supports a tag such that:
An optional component attribute is used to refer to another component.
An optional sub-element is used to define the component in-place.

Author:
Ben Yu Nov 9, 2005 11:44:54 PM
See Also:
Serialized Form

Constructor Summary
DelegatingNut()
           
 
Method Summary
 void add(java.lang.Object sub)
           
protected  void delegateTo(Component cc)
          Subclass override this method to wrap around the delegate target.
 Component getComponent()
           
protected  Component getMandatory()
          Get the Component object.
 void setComponent(Component cc)
           
 
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

DelegatingNut

public DelegatingNut()
Method Detail

getComponent

public Component getComponent()

getMandatory

protected Component getMandatory()
Get the Component object. Exception is thrown if it has not been set yet.


setComponent

public void setComponent(Component cc)

add

public void add(java.lang.Object sub)

delegateTo

protected void delegateTo(Component cc)
Subclass override this method to wrap around the delegate target.

Parameters:
cc - the delegate target.