Package net.sf.json
Class JSONFunction
java.lang.Object
net.sf.json.JSONFunction
- All Implemented Interfaces:
Serializable
JSONFunction represents a javaScript function's text.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJSONFunction
(String text) Constructs a JSONFunction with no parameters.JSONFunction
(String[] params, String text) Constructs a JSONFunction with parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
String[]
Returns the parameters of this function.getText()
Reeturns the text of this function.int
hashCode()
static JSONFunction
Constructs a JSONFunction from a text representationtoString()
Returns the string representation of this function.
-
Field Details
-
EMPTY_PARAM_ARRAY
constant array for empty parameters -
params
the parameters of this function -
text
the text of this function
-
-
Constructor Details
-
JSONFunction
Constructs a JSONFunction with no parameters.- Parameters:
text
- The text of the function
-
JSONFunction
Constructs a JSONFunction with parameters.- Parameters:
params
- The parameters of the functiontext
- The text of the function
-
-
Method Details
-
parse
Constructs a JSONFunction from a text representation -
equals
-
getParams
Returns the parameters of this function. -
getText
Reeturns the text of this function. -
hashCode
public int hashCode() -
toString
Returns the string representation of this function.
-