Interface SymbolScriptable

All Known Implementing Classes:
ArrowFunction, BaseFunction, BindingsObject, BoundFunction, Delegator, ES6Generator, ES6Iterator, FunctionObject, IdFunctionObject, IdFunctionObjectES6, IdScriptableObject, ImporterTopLevel, JavaConstructorObject, JavaFunctionObject, JavaObjectWrapper, LambdaConstructor, LambdaFunction, ModuleScope, NativeArray, NativeArrayBuffer, NativeArrayBufferView, NativeArrayIterator, NativeCall, NativeCallSite, NativeCollectionIterator, NativeConsole, NativeContinuation, NativeDataView, NativeFloat32Array, NativeFloat64Array, NativeFunction, NativeGenerator, NativeInt16Array, NativeInt32Array, NativeInt8Array, NativeIterator, NativeIterator.StopIteration, NativeJavaArray, NativeJavaClass, NativeJavaConstructor, NativeJavaList, NativeJavaMap, NativeJavaMethod, NativeJavaObject, NativeJavaPackage, NativeJavaTopPackage, NativeJSON, NativeMap, NativeObject, NativePromise, NativeRegExp, NativeRegExpStringIterator, NativeSet, NativeStringIterator, NativeSymbol, NativeTypedArrayView, NativeUint16Array, NativeUint32Array, NativeUint8Array, NativeUint8ClampedArray, NativeWeakMap, NativeWeakSet, NativeWith, Require, ScriptableObject, Synchronizer, TopLevel, XMLObject

public interface SymbolScriptable
This interface may be combined with any object that implements Scriptable to add support for properties keyed by Symbol objects (as opposed to String and number objects as in previous versions of JavaScript. It's separated into its own interface so that the addition of Symbol support does not break compatibility for existing code.
Since:
1.7.8
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Delete a property with the specified key.
    get(Symbol key, Scriptable start)
    Return the value of the property with the specified key, or NOT_FOUND.
    boolean
    has(Symbol key, Scriptable start)
    Return true if the specified property exists.
    void
    put(Symbol key, Scriptable start, Object value)
    Add a new property to to the object.
  • Method Details

    • get

      Object get(Symbol key, Scriptable start)
      Return the value of the property with the specified key, or NOT_FOUND.
    • has

      boolean has(Symbol key, Scriptable start)
      Return true if the specified property exists.
    • put

      void put(Symbol key, Scriptable start, Object value)
      Add a new property to to the object.
    • delete

      void delete(Symbol key)
      Delete a property with the specified key.