com.github.dandelion.datatables.core.asset
Class JavascriptFunction

java.lang.Object
  extended by com.github.dandelion.datatables.core.asset.JavascriptFunction

public class JavascriptFunction
extends Object

Bean used to hold a Javascript function that must not be converted into String by the JSON parser.

Overriding the toString() method allow the parser to return the Javascript content as an Object, resulting in a non-quoted String in JSON format.

Since:
0.8.11
Author:
Thibault Duchateau

Constructor Summary
JavascriptFunction(String code)
           
JavascriptFunction(String code, boolean hasReturn)
           
JavascriptFunction(String code, boolean hasReturn, String... args)
           
JavascriptFunction(String code, String... args)
           
 
Method Summary
 void appendCode(char character)
           
 void appendCode(String code)
           
 boolean equals(Object javascriptFunction)
           
 String getCode()
           
 int hashCode()
           
 void setCode(String code)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavascriptFunction

public JavascriptFunction(String code)

JavascriptFunction

public JavascriptFunction(String code,
                          boolean hasReturn)

JavascriptFunction

public JavascriptFunction(String code,
                          String... args)

JavascriptFunction

public JavascriptFunction(String code,
                          boolean hasReturn,
                          String... args)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getCode

public String getCode()

setCode

public void setCode(String code)

appendCode

public void appendCode(String code)

appendCode

public void appendCode(char character)

equals

public boolean equals(Object javascriptFunction)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013–2014 Dandelion Project. All rights reserved.