org.eclipse.wst.jsdt.chromium

## Enum JsValue.Type

- java.lang.Object
- - java.lang.Enum<JsValue.Type>
  - - org.eclipse.wst.jsdt.chromium.JsValue.Type

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<JsValue.Type>

Enclosing interface:
  JsValue

    public static enum JsValue.Type
    extends java.lang.Enum<JsValue.Type>

Type of a JavaScript value. Two bogus type values (DATE and ARRAY) are included even though they are not reported by V8. Instead, they are inferred from the object classname. `null` value has a bogus type NULL.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`TYPE_ARRAY` An object which is actually an array.
`TYPE_BOOLEAN` Boolean type.
`TYPE_DATE` An object which is actually a Date.
`TYPE_ERROR` Error type (this one describes a JavaScript exception).
`TYPE_FUNCTION` Function type.
`TYPE_NULL` null type.
`TYPE_NUMBER` Number type.
`TYPE_OBJECT` Object type.
`TYPE_REGEXP` A regular expression.
`TYPE_STRING` String type.
`TYPE_UNDEFINED` undefined type.

### Method Summary

All Methods Static Methods Concrete Methods
`static boolean` `isObjectType(JsValue.Type type)` Returns whether `type` corresponds to a JsObject.
`static JsValue.Type` `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static JsValue.Type[]` `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

#### TYPE_OBJECT

    public static final JsValue.Type TYPE_OBJECT

Object type.

#### TYPE_NUMBER

    public static final JsValue.Type TYPE_NUMBER

Number type.

#### TYPE_STRING

    public static final JsValue.Type TYPE_STRING

String type.

#### TYPE_FUNCTION

    public static final JsValue.Type TYPE_FUNCTION

Function type.

#### TYPE_BOOLEAN

    public static final JsValue.Type TYPE_BOOLEAN

Boolean type.

#### TYPE_ERROR

    public static final JsValue.Type TYPE_ERROR

Error type (this one describes a JavaScript exception).

#### TYPE_REGEXP

    public static final JsValue.Type TYPE_REGEXP

A regular expression.

#### TYPE_DATE

    public static final JsValue.Type TYPE_DATE

An object which is actually a Date. This type is not present in the protocol but is rather induced from the "object" type and "Date" class of an object.

#### TYPE_ARRAY

    public static final JsValue.Type TYPE_ARRAY

An object which is actually an array. This type is not present in the protocol but is rather induced from the "object" type and "Array" class of an object.

#### TYPE_UNDEFINED

    public static final JsValue.Type TYPE_UNDEFINED

undefined type.

#### TYPE_NULL

    public static final JsValue.Type TYPE_NULL

null type. This is a bogus type that doesn't exist in JavaScript.

### Method Detail

#### values

    public static JsValue.Type[] 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 (JsValue.Type c : JsValue.Type.values())
        System.out.println(c);

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

#### valueOf

    public static JsValue.Type valueOf(java.lang.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:
  `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
  `java.lang.NullPointerException` - if the argument is null

#### isObjectType

    public static boolean isObjectType(JsValue.Type type)

Returns whether `type` corresponds to a JsObject. Note that while 'null' is an object in JavaScript world, here for API consistency it has bogus type `TYPE_NULL` and is not a `JsObject`.

Parameters:
  `type` - to check