|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.directwebremoting.ScriptBuffer
public class ScriptBuffer
A ScriptBuffer is like a StringBuffer except that it is used to create
Javascript commands. There are 2 version of the append()
method:
The first is appendScript(String)
which assumes that the
parameter is to be inserted literally into the output.
The second is appendData(String)
(and variants for Object and
primitive types) which assumes that the parameter is a variable which should
be properly converted, escaped and quoted.
Nested Class Summary | |
---|---|
class |
ScriptBuffer.StringWrapper
A wrapper around a string to distinguish a string entered into this buffer as code and a string entered as data |
Constructor Summary | |
---|---|
ScriptBuffer()
Create an empty ScriptBuffer. |
|
ScriptBuffer(java.lang.String str)
Create a ScriptBuffer with some initial content. |
Method Summary | |
---|---|
ScriptBuffer |
appendData(boolean b)
|
ScriptBuffer |
appendData(char c)
|
ScriptBuffer |
appendData(double d)
|
ScriptBuffer |
appendData(float f)
|
ScriptBuffer |
appendData(int i)
|
ScriptBuffer |
appendData(long l)
|
ScriptBuffer |
appendData(java.lang.Object obj)
|
ScriptBuffer |
appendData(java.lang.String str)
|
ScriptBuffer |
appendScript(java.lang.String str)
|
java.util.List |
getParts()
For DWR use only - This method is not part of the public API. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScriptBuffer()
public ScriptBuffer(java.lang.String str)
appendScript(String)
is called with the passed string
str
- The initial string to place in the bufferMethod Detail |
---|
public ScriptBuffer appendScript(java.lang.String str)
str
- The String to add to the script
StringBuffer.append(java.lang.String)
public ScriptBuffer appendData(boolean b)
b
- The boolean to add to the script
StringBuffer.append(boolean)
public ScriptBuffer appendData(char c)
c
- The char to add to the script
StringBuffer.append(char)
public ScriptBuffer appendData(double d)
d
- The double to add to the script
StringBuffer.append(double)
public ScriptBuffer appendData(float f)
f
- The float to add to the script
StringBuffer.append(float)
public ScriptBuffer appendData(int i)
i
- The int to add to the script
StringBuffer.append(int)
public ScriptBuffer appendData(long l)
l
- The long to add to the script
StringBuffer.append(long)
public ScriptBuffer appendData(java.lang.Object obj)
obj
- The Object to add to the script
StringBuffer.append(java.lang.Object)
public ScriptBuffer appendData(java.lang.String str)
str
- The String to add to the script
StringBuffer.append(java.lang.String)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List getParts()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |