|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cookxml.core.creator.DefaultCreator
This creator is for any classes that have a default constructor.
Field Summary | |
static Class[] |
EMPTY_CLASS_PARAM
|
static Object[] |
EMPTY_OBJECT_PARAM
|
Method Summary | |
Object |
create(String parentNS,
String parentTag,
Element elm,
Object parentObj,
DecodeEngine decodeEngine)
This function is called whenever decodeEngine starts processing an element. |
Object |
editFinished(String parentNS,
String parentTag,
Element elm,
Object parentObj,
Object obj,
DecodeEngine decodeEngine)
This function is called when the element and its subnodes have all been processed. and about to be returned. |
static Creator |
getCreator(Class targetClass)
|
static Creator |
getCreator(Class targetClass,
boolean addAfterFinish)
This function used to generate a creator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Class[] EMPTY_CLASS_PARAM
public static final Object[] EMPTY_OBJECT_PARAM
Method Detail |
public static Creator getCreator(Class targetClass) throws CookXmlException
CookXmlException
public static Creator getCreator(Class targetClass, boolean addAfterFinish) throws CookXmlException
targetClass
- the class objectaddAfterFinish
- a flag that indicates not to add the object after
its creation, but rather wait until all the setup
has been done.
CookXmlException
public Object create(String parentNS, String parentTag, Element elm, Object parentObj, DecodeEngine decodeEngine) throws CreatorException
Creator
There can be creative use of this function. For example, one could create another instance of CookXml that process the element differently, then call this instanceof decodeEngine to add the processed object to the parent, and then return null to tell this instance of decodeEngine/CookXml to stop processing the element.
create
in interface Creator
parentNS
- the parent tag namespace.parentTag
- the parent tag that contains this elementelm
- the DOM element that contains all the information regarding this node.parentObj
- the parent object in the nodedecodeEngine
- the decode engine that is being used @throws CreatorException
CreatorException
public Object editFinished(String parentNS, String parentTag, Element elm, Object parentObj, Object obj, DecodeEngine decodeEngine) throws CookXmlException
Creator
editFinished
in interface Creator
parentNS
- the parent tag namespace.parentTag
- the parent element tagelm
- the DOM element that contains all the information regarding this node.parentObj
- the parent object of the parent elementobj
- the object that was created by this create functiondecodeEngine
- the decode engine that is being used.
CookXmlException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |