public class JSFunctionDefinition extends ScriptStringBase implements ScriptString
COLON, COMMA, DOT, EMPTY_STRING, EQUALS, FUNCTION, LEFT_CURLY_BRACKET, LEFT_ROUND_BRACKET, LEFT_SQUARE_BRACKET, RIGHT_CURLY_BRACKET, RIGHT_ROUND_BRACKET, RIGHT_SQUARE_BRACKET
Constructor and Description |
---|
JSFunctionDefinition(Object... params)
Construct
JSFunctionDefinition with arbitrary list of params |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(Object param) |
JSFunctionDefinition |
addToBody(Object body) |
protected void |
appendBody(Appendable target) |
protected void |
appendFunctionName(Appendable target) |
void |
appendScript(Appendable target)
Append JavaScript code to @link
Appendable |
String |
getName() |
void |
setName(String name) |
appendScriptToStringBuilder, toScript, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendScriptToStringBuilder, toScript
public JSFunctionDefinition(Object... params)
JSFunctionDefinition
with arbitrary list of paramsparams
- public void addParameter(Object param)
public JSFunctionDefinition addToBody(Object body)
public void appendScript(Appendable target) throws IOException
ScriptString
Appendable
appendScript
in interface ScriptString
IOException
public String getName()
public void setName(String name)
name
- the name to setprotected void appendFunctionName(Appendable target) throws IOException
IOException
protected void appendBody(Appendable target) throws IOException
IOException
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.