org.jclientpages.util
Class JCPUtils

java.lang.Object
  extended by org.jclientpages.util.JCPUtils

public class JCPUtils
extends java.lang.Object

some utilities for internal use

Author:
Luigi Dell'Aquila (luigi.dellaquila--at--gmail.com)

Constructor Summary
JCPUtils()
           
 
Method Summary
static java.lang.Object box(java.lang.Object object)
          if the object is a JSObject, this method boxes it in a ClientPageNode
static java.lang.String quoteString(java.lang.String iString)
          quotes a string to be used in a js function
static java.lang.Object unbox(java.lang.Object object)
          if the parameter is a ClientPageNode, it returns the corresponding JSObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCPUtils

public JCPUtils()
Method Detail

quoteString

public static java.lang.String quoteString(java.lang.String iString)
quotes a string to be used in a js function

Parameters:
iString - the string to be quoted
Returns:
the quoted string

box

public static java.lang.Object box(java.lang.Object object)
if the object is a JSObject, this method boxes it in a ClientPageNode

Parameters:
object - the object to be boxed
Returns:
the corresponding ClientPageNode if the parameter is a JSObject, the input parameter otherwise

unbox

public static java.lang.Object unbox(java.lang.Object object)
if the parameter is a ClientPageNode, it returns the corresponding JSObject

Parameters:
object - the object to be unboxed
Returns:
the corresponding JSObject if the parameter is a ClientPageNode, the input parameter otherwise