public interface ScriptExpr
If the expression have properties or methods this interface provides methods to generate JavaScript code to access or call them.
ScriptUtil.createScriptExpr(Object)
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCallMethodCode(java.lang.String methodName,
java.lang.Object[] params)
Generates the JavaScript code to call the specified method of the result of this expression.
|
java.lang.String |
getCallMethodCode(java.lang.String methodName,
java.lang.Object[] params,
boolean endSentence)
Generates the JavaScript code to call the specified method of the result of this expression.
|
java.lang.String |
getCode()
Returns the JavaScript code of this expression.
|
java.lang.String |
getGetPropertyCode(java.lang.String propName)
Generates the JavaScript code to get the value of the specified property of the result of this expression.
|
java.lang.String |
getGetPropertyCode(java.lang.String propName,
boolean endSentence)
Generates the JavaScript code to get the value of the specified property of the result of this expression.
|
java.lang.String |
getSetPropertyCode(java.lang.String propName,
java.lang.Object value)
Generates the JavaScript code to set a value to the specified property of the result of this expression.
|
java.lang.String |
getSetPropertyCode(java.lang.String propName,
java.lang.Object value,
boolean endSentence)
Generates the JavaScript code to set a value to the specified property of the result of this expression.
|
java.lang.String getCode()
The specified object is converted to JavaScript following the rules
of ScriptUtil.toScript(Object)
with an exception: if a String
the
content is not converted to a JavaScript string literal.
java.lang.String getSetPropertyCode(java.lang.String propName, java.lang.Object value, boolean endSentence)
propName
- property name.value
- the value to set. Is converted to JavaScript calling ScriptUtil.toScript(Object)
.endSentence
- if true adds a ; at the end.ScriptUtil.getSetPropertyCode(Object,String,Object,boolean)
java.lang.String getSetPropertyCode(java.lang.String propName, java.lang.Object value)
propName
- property name.value
- the value to set. Is converted to JavaScript calling ScriptUtil.toScript(Object)
.ScriptUtil.getSetPropertyCode(Object,String,Object)
java.lang.String getGetPropertyCode(java.lang.String propName, boolean endSentence)
propName
- property name.endSentence
- if true adds a ; at the end.ScriptUtil.getGetPropertyCode(Object,String,boolean)
java.lang.String getGetPropertyCode(java.lang.String propName)
propName
- property name.ScriptUtil.getGetPropertyCode(Object,String)
java.lang.String getCallMethodCode(java.lang.String methodName, java.lang.Object[] params, boolean endSentence)
methodName
- method name.params
- the parameter list. Are converted to JavaScript calling ScriptUtil.toScript(Object)
.endSentence
- if true adds a ; at the end.ScriptUtil.getCallMethodCode(Object,String,Object[],boolean)
java.lang.String getCallMethodCode(java.lang.String methodName, java.lang.Object[] params)
methodName
- method name.params
- the parameter list. Are converted to JavaScript calling ScriptUtil.toScript(Object)
.ScriptUtil.getCallMethodCode(Object,String,Object[])
Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.