cookxml.core.adder
Class CompoundAdder

java.lang.Object
  extended by cookxml.core.adder.CompoundAdder
All Implemented Interfaces:
DocletActionReporter, Adder

public class CompoundAdder
extends Object
implements Adder, DocletActionReporter

This adder is used internally by InheritableTagLibrary to combine several individual adders into one.

Since:
CookXml 1.0
Version:
$Id: CompoundAdder.java 255 2007-06-10 07:08:13Z coconut $
See Also:
InheritableTagLibrary

Constructor Summary
CompoundAdder()
           
 
Method Summary
 void add(Adder adder)
           
 boolean add(String ns, String parentTag, Object parent, Object child, cookxml.core.DecodeEngine decodeEngine)
          Add the child to the parent.
 Object[] getActions(TagLibrary tagLibrary, String tagNS, String tag, String attrNS, String attr, Class cl)
          This function returns the related function/constructor/field/methods that is called by creator/setter etc.
static Adder getAdder(Adder oldAdder, Adder newAdder)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompoundAdder

public CompoundAdder()
Method Detail

add

public boolean add(String ns,
                   String parentTag,
                   Object parent,
                   Object child,
                   cookxml.core.DecodeEngine decodeEngine)
            throws Exception
Description copied from interface: Adder
Add the child to the parent. The function should return true if it is the right adder for the request. False if it is not. Throw exceptions for errors.

Specified by:
add in interface Adder
Parameters:
ns - the parent tag namespace.
parentTag - the parent tag name.
parent - the parent object.
child - the child object.
decodeEngine - the DecodeEngine instance being used.
Returns:
whether or not the adder can handle the request.
Throws:
Exception - If the exception is not a AdderException, then it is wrapped inside one by the DecodeEngine and handled by the ExceptionHandler.

add

public void add(Adder adder)

toString

public String toString()
Overrides:
toString in class Object

getActions

public Object[] getActions(TagLibrary tagLibrary,
                           String tagNS,
                           String tag,
                           String attrNS,
                           String attr,
                           Class cl)
Description copied from interface: DocletActionReporter
This function returns the related function/constructor/field/methods that is called by creator/setter etc. CookXmlDoc would then retrieve the JavaDoc associated with Member object and use it in the documentation.

Specified by:
getActions in interface DocletActionReporter
Parameters:
tagLibrary - the tag library being used.
tagNS - the namespace of the tag
tag - possible tag
attrNS - the namespace of the attribute
attr - the attribute
cl - the possible class
Returns:
A non-empty array of actions performed by this object.

getAdder

public static Adder getAdder(Adder oldAdder,
                             Adder newAdder)