|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cookxml.cookjs.creator.JSCreator
This creator creates a new JavaScript interpreter. It creates a hierarchy of scopes ImporterTopLevel -> Context scope -> CookXmlScope -> NativeObject scope (for actual interpretation).
ImporterTopLevel
,
Context
,
NativeObject
Field Summary | |
static String |
DEFAULT_SRC_NAME
|
static String |
SRC_ATTR
|
Method Summary | |
Object |
create(String parentTag,
Element elm,
Object parentObj,
String value,
DecodeEngine decodeEngine)
This function is called whenever decodeEngine starts processing an element. |
Object |
editFinished(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 |
getInstance()
|
static boolean |
isDisablingOptimization()
|
static boolean |
isUsingProxyJavaAdapter()
|
static void |
setDisablingOptimization(boolean disablingOptimization)
|
static void |
setUsingProxyJavaAdapter(boolean b)
Set true if you want to use ProxyJavaAdapter, which is a JDK 1.3 feature that allows dynamic binding of JavaScript object functions etc to Java objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String SRC_ATTR
public static final String DEFAULT_SRC_NAME
Method Detail |
public static boolean isUsingProxyJavaAdapter()
public static void setUsingProxyJavaAdapter(boolean b)
b
- use or notpublic static boolean isDisablingOptimization()
public static void setDisablingOptimization(boolean disablingOptimization)
public static Creator getInstance()
public Object create(String parentTag, Element elm, Object parentObj, String value, 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
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 nodevalue
- the string value specified in the constructor fielddecodeEngine
- the decode engine that is being used
CreatorException
public Object editFinished(String parentTag, Element elm, Object parentObj, Object obj, DecodeEngine decodeEngine) throws CookXmlException
Creator
editFinished
in interface Creator
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 |