org.zkoss.web.servlet
Class JavaScript

java.lang.Object
  extended by org.zkoss.web.servlet.JavaScript

public class JavaScript
extends Object

Represents a javascript.

Author:
tomyeh

Constructor Summary
JavaScript(String content)
          Creates by assigning the content (JavaScript codes).
JavaScript(String src, String charset)
          Creates by specifying the file to contain the JavaScript codes.
 
Method Summary
 boolean equals(Object o)
           
 String getCharset()
          Returns the charset, or null if getContent() is not null.
 String getContent()
          Returns the JavaScript codes, or null if getSrc() is not null.
 String getSrc()
          Returns the URI of the file containing the JavaScript codes, or null if getContent() is not null.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaScript

public JavaScript(String src,
                  String charset)
Creates by specifying the file to contain the JavaScript codes.

Parameters:
src - URI of the file containing the JavaScript codes.
charset - the charset. If null, "UTF-8" is assumed.

JavaScript

public JavaScript(String content)
Creates by assigning the content (JavaScript codes).

Parameters:
content - the JavaScript codes.
Method Detail

getSrc

public String getSrc()
Returns the URI of the file containing the JavaScript codes, or null if getContent() is not null.


getCharset

public String getCharset()
Returns the charset, or null if getContent() is not null.


getContent

public String getContent()
Returns the JavaScript codes, or null if getSrc() is not null.


toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2012. All Rights Reserved.