org.xwiki.gwt.dom.client
Enum JavaScriptType

java.lang.Object
  extended by java.lang.Enum<JavaScriptType>
      extended by org.xwiki.gwt.dom.client.JavaScriptType
All Implemented Interfaces:
Serializable, Comparable<JavaScriptType>

public enum JavaScriptType
extends Enum<JavaScriptType>

The type a JavaScript variable can have.

Version:
$Id: c50a007fb6b9ee83e8ad27c1427d947b24d5e4a4 $

Enum Constant Summary
BOOLEAN
          The boolean variable is used to record a value of either true or false.
FUNCTION
          Any built-in or user defined function.
NUMBER
          The number variable holds any type of number, either an integer or a real number.
OBJECT
          JavaScript provides a set of predefined objects to which the JavaScript programmer has access.
STRING
          The string variable type stores a string of characters, typically making up either a word or sentence.
UNDEFINED
          A JavaScript variable whose value is not set.
 
Method Summary
static JavaScriptType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JavaScriptType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BOOLEAN

public static final JavaScriptType BOOLEAN
The boolean variable is used to record a value of either true or false.


NUMBER

public static final JavaScriptType NUMBER
The number variable holds any type of number, either an integer or a real number.


STRING

public static final JavaScriptType STRING
The string variable type stores a string of characters, typically making up either a word or sentence. String variables can also be assigned empty strings.


FUNCTION

public static final JavaScriptType FUNCTION
Any built-in or user defined function. A function is one of the basic building blocks of most programming languages including JavaScript. Functions provide a way to organize functionality into clean, reusable modules that can be accessed from any other JavaScript to perform specific tasks. In addition to user created functions, JavaScript contains a number of built-in functions that provide pre-defined functionality.


OBJECT

public static final JavaScriptType OBJECT
JavaScript provides a set of predefined objects to which the JavaScript programmer has access. For example the document object refers to the current web page and can be accessed to make changes to the page content.


UNDEFINED

public static final JavaScriptType UNDEFINED
A JavaScript variable whose value is not set.

Method Detail

values

public static JavaScriptType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (JavaScriptType c : JavaScriptType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static JavaScriptType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2004-2013 XWiki. All Rights Reserved.