cookxml.core.adder
Class CallSetterAdder

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

public class CallSetterAdder
extends Object
implements Adder, DocletActionReporter

This Adder redirect the call to set attribute instead, if the parameters match.

Since:
CookXml 1.0
Version:
$Id: CallSetterAdder.java 223 2007-06-06 06:51:30Z coconut $

Constructor Summary
CallSetterAdder(String attr, Class parentClass, Class childClass)
           
 
Method Summary
 boolean add(String parentNS, 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallSetterAdder

public CallSetterAdder(String attr,
                       Class parentClass,
                       Class childClass)
Method Detail

add

public boolean add(String parentNS,
                   String parentTag,
                   Object parent,
                   Object child,
                   cookxml.core.DecodeEngine decodeEngine)
            throws AdderException
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:
parentNS - 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:
AdderException

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.