Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.chromium.sdk
Interface JsObject

All Superinterfaces:
  JsValue

All Known Subinterfaces:
  JsArray, JsFunction

    public interface JsObject

extends JsValue

A compound JsValue that has zero or more properties. Note that JavaScript `null` value while officially being 'object' in the SDK is represented as a plain `JsValue`.

Nested Class Summary

Nested classes/interfaces inherited from interface org.chromium.sdk.JsValue
`JsValue.ReloadBiggerCallback, JsValue.Type`

Method Summary
`JsArray` | `asArray()`
`JsFunction` | `asFunction()`
`java.lang.String` | `getClassName()`
`java.util.Collection<? extends JsVariable>` | `getInternalProperties()`
`java.util.Collection<? extends JsVariable>` | `getProperties()`
`JsVariable` | `getProperty(java.lang.String name)`
`java.lang.String` | `getRefId()` Optionally returns unique id for this object.
`RemoteValueMapping` | `getRemoteValueMapping()`

Methods inherited from interface org.chromium.sdk.JsValue
`asObject, getType, getValueString, isTruncated, reloadHeavyValue`

Method Detail

### getClassName

    java.lang.String getClassName()

  Returns:
    the class name of this object

### getProperties

    java.util.Collection<? extends JsVariable> getProperties()
                                                             throws MethodIsBlockingException

  Returns:
    the own properties of this compound value (does not include properties from proto object)
  Throws:
    `MethodIsBlockingException` - because it may need to load value from remote TODO: make it return list of JsObjectProperty once hacks for supporting exceptions are removed.

### getInternalProperties

    java.util.Collection<? extends JsVariable> getInternalProperties()
                                                                     throws MethodIsBlockingException

  Returns:
    the internal properties of this compound value (e.g. those properties which are not detectable with the "in" operator: __proto__ etc)
  Throws:
    `MethodIsBlockingException` - because it may need to load value from remote

### getProperty

    JsVariable getProperty(java.lang.String name)
                           throws MethodIsBlockingException

  Parameters:
    `name` - of the property to get
  Returns:
    the own property object or `null` if `name` does not designate an existing object property (does not return properties from proto object)
  Throws:
    `MethodIsBlockingException` - because it may need to load value from remote

### asArray

    JsArray asArray()

  Returns:
    this object cast to `JsArray` or `null` if this object is not an array

### asFunction

    JsFunction asFunction()

  Returns:
    this object cast to `JsFunction` or `null` if this object is not a function

### getRefId

    java.lang.String getRefId()

  Optionally returns unique id for this object. No two distinct objects can have the same id. Lifetime of id is limited to lifetime of its `RemoteValueMapping` (typically corresponds to the lifetime of `DebugContext`.)

  Returns:
    object id or null
  See Also:
    `getRemoteValueMapping()`

### getRemoteValueMapping

    RemoteValueMapping getRemoteValueMapping()

  Returns:
    value mapping this object is associated with or null for special-case immutable objects

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD