org.eclipse.wst.jsdt.chromium

## Interface JsVariable

All Known Subinterfaces:
  JsDeclarativeVariable, JsObjectProperty

    public interface JsVariable

An object that represents a variable in a browser JavaScript VM, a call frame variable and/or an object property.

### Property Summary

All Methods Instance Methods Abstract Methods
`JsObjectProperty` `asObject` Returns object property data if variable is an object property and its descriptor is available.

### Method Summary

All Methods Instance Methods Abstract Methods
`JsDeclarativeVariable` `asDeclarativeVariable()` Casts this to declarative variable type if available or returns null.
`JsObjectProperty` `asObjectProperty()` Returns object property data if variable is an object property and its descriptor is available.
`java.lang.String` `getName()` Returns variable name.
`JsValue` `getValue()` Returns the value of this variable.

### Property Detail

#### asObject

    JsObjectProperty asObjectProperty

Returns object property data if variable is an object property and its descriptor is available.

### Method Detail

#### getValue

    JsValue getValue()
              throws java.lang.UnsupportedOperationException

Returns the value of this variable.

Returns:
  a [probably compound] JsValue corresponding to this variable. `null` if there was an error reading the value data or the property has accessor descriptor
Throws:
  `java.lang.UnsupportedOperationException` - if this variable is not readable
See Also:
  `#isReadable()`

#### getName

    java.lang.String getName()

Returns variable name. If the variable is an object property, in some implementations (namely V8 Standalone protocol) the numeric property name may be decorated with square brackets.

Returns:
  the name of this variable

#### asObjectProperty

    JsObjectProperty asObjectProperty()

Returns object property data if variable is an object property and its descriptor is available.

#### asDeclarativeVariable

    JsDeclarativeVariable asDeclarativeVariable()

Casts this to declarative variable type if available or returns null.