cookxml.core.setter
Class CallFunctionSetter
java.lang.Object
cookxml.core.setter.CallFunctionSetter
- All Implemented Interfaces:
- DocletActionReporter, Setter
public class CallFunctionSetter
- extends Object
- implements Setter, DocletActionReporter
This Setter redirect the call to a function, if the parameters match.
- Since:
- CookXml 1.0
- Version:
- $Id: CallFunctionSetter.java 265 2007-06-10 18:47:06Z coconut $
Method Summary |
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 Setter |
getSetter(String funcName,
Class parentClass,
Class childClass)
|
static void |
set(String ns,
String tag,
Object obj,
Object value,
cookxml.core.DecodeEngine decodeEngine,
Class objectClass,
Class valueClass,
String funcName)
|
void |
setAttribute(String ns,
String tag,
String attrNS,
String attr,
Object obj,
Object value,
cookxml.core.DecodeEngine decodeEngine)
Set an attribute of the object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CallFunctionSetter
public CallFunctionSetter(String funcName,
Class parentClass,
Class childClass)
CallFunctionSetter
public CallFunctionSetter(String funcName,
Method method,
Class parentClass,
Class childClass)
getSetter
public static Setter getSetter(String funcName,
Class parentClass,
Class childClass)
setAttribute
public void setAttribute(String ns,
String tag,
String attrNS,
String attr,
Object obj,
Object value,
cookxml.core.DecodeEngine decodeEngine)
throws Exception
- Description copied from interface:
Setter
- Set an attribute of the object.
- Specified by:
setAttribute
in interface Setter
- Parameters:
ns
- the namespace of the element.tag
- the tag of the elementattrNS
- the namespace of the attributeattr
- the name of the attributeobj
- the object associated with the elementvalue
- the value of the object. We didn't use the String type because it is
entirely possible for an object of the child elements to call the setter.decodeEngine
- the DecodeEngine being used.
- Throws:
Exception
- If the exception is not a SetterException
,
then it is wrapped inside one by the DecodeEngine and handled by the
ExceptionHandler
.
set
public static void set(String ns,
String tag,
Object obj,
Object value,
cookxml.core.DecodeEngine decodeEngine,
Class objectClass,
Class valueClass,
String funcName)
throws CookXmlException
- Throws:
CookXmlException
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 tagtag
- possible tagattrNS
- the namespace of the attributeattr
- the attributecl
- the possible class
- Returns:
- A non-empty array of actions performed by this object.