|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.expression.ExNode
com.waveset.expression.ExNew
Function implementation for the <new> function.
Field Summary | |
static java.lang.String |
code_id
|
Fields inherited from class com.waveset.expression.ExNode |
_bindingCount, _children, _decoration, _parent, trace |
Constructor Summary | |
ExNew()
|
Method Summary | |
protected ExValue |
evalInternal(ExState state)
Evaluate the |
java.lang.String |
getClassName()
|
java.lang.String |
getFunctionName()
Nodes representing functions must have a name. |
void |
parseXml(org.w3c.dom.Element el)
Default XML parsing method. |
void |
setClassName(java.lang.String s)
|
void |
toXmlAttributes(java.lang.StringBuffer b)
Add attributes in the start tag of this node. |
Methods inherited from class com.waveset.expression.ExNode |
addChild, addChildren, addCommonAttributes, beginTrace, clearOwner, endTrace, eval, evalChild, evalChildToObject, evalChildToString, evalToBoolean, evalToInt, evalToObject, evalToString, getBindingCount, getChild, getChildren, getDecoration, getHiddenVariable, getLocation, getOwner, getParent, isLiteral, parseCommonAttributes, postProcess, removeChild, resolveFunction, resolveVariable, setBindingCount, setChildren, setDecoration, setEnvironment, setLocation, setOwner, setOwner, setParent, toXml, toXml, toXml, toXmlChildren |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
Constructor Detail |
public ExNew()
Method Detail |
public java.lang.String getFunctionName()
ExNode
getFunctionName
in class ExNode
public java.lang.String getClassName()
public void setClassName(java.lang.String s)
public void parseXml(org.w3c.dom.Element el) throws WavesetException
ExNode
parseXml
in class ExNode
WavesetException
public void toXmlAttributes(java.lang.StringBuffer b)
ExNode
toXmlAttributes
in class ExNode
protected ExValue evalInternal(ExState state) throws WavesetException
The class name was specified as an attribute, any subexpressions are arguments to the constructor. Evaluate each of the subexpressions to a Java object, and try to locate a constructor signature.
We're fairly limited on the signatures we'll recognize, you must use String, Integer, and List as the constructor arguments. If any of the subexpressions returns null, we'll treat it as a generic Object argument. This may result in errors, if you have Foo(String) but the argument expression returns null, we'll look for Foo(Object). We could try to be smarter, but its complicated and ambiguous.
If the constructor can't be found, the constructor throws an exception, we return null.
evalInternal
in class ExNode
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |