Class Symbol

java.lang.Object
com.oracle.truffle.js.runtime.Symbol
All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject

public final class Symbol extends Object implements com.oracle.truffle.api.interop.TruffleObject
See Also:
  • Field Details

    • SYMBOL_HAS_INSTANCE

      public static final Symbol SYMBOL_HAS_INSTANCE
      A method that determines if a constructor object recognizes an object as one of the constructor's instances. Called by the semantics of the instanceof operator.
    • SYMBOL_IS_CONCAT_SPREADABLE

      public static final Symbol SYMBOL_IS_CONCAT_SPREADABLE
      A Boolean valued property that if true indicates that an object should be flatten to its array elements by Array.prototype.concat.
    • SYMBOL_ITERATOR

      public static final Symbol SYMBOL_ITERATOR
      A method that returns the default iterator for an object. Called by the semantics of the for-of statement.
    • SYMBOL_ASYNC_ITERATOR

      public static final Symbol SYMBOL_ASYNC_ITERATOR
      A method that returns the default asynchronous iterator for an object. Called by the semantics of the for-await-of statement.
    • SYMBOL_MATCH

      public static final Symbol SYMBOL_MATCH
      A regular expression method that matches the regular expression against a string. Called by the String.prototype.match method.
    • SYMBOL_MATCH_ALL

      public static final Symbol SYMBOL_MATCH_ALL
      A regular expression method that returns an iterator, that yields matches of the regular expression against a string. Called by the String.prototype.matchAll method.
    • SYMBOL_REPLACE

      public static final Symbol SYMBOL_REPLACE
      A regular expression method that replaces matched substrings of a string. Called by the String.prototype.replace method.
    • SYMBOL_SPECIES

      public static final Symbol SYMBOL_SPECIES
      A function valued property that is the constructor function that is used to create derived objects.
    • SYMBOL_SPLIT

      public static final Symbol SYMBOL_SPLIT
      A regular expression method that splits a string at the indices that match the regular expression. Called by the String.prototype.split method.
    • SYMBOL_TO_PRIMITIVE

      public static final Symbol SYMBOL_TO_PRIMITIVE
      A method that converts an object to a corresponding primitive value. Called by the ToPrimitive abstract operation.
    • SYMBOL_TO_STRING_TAG

      public static final Symbol SYMBOL_TO_STRING_TAG
      A property whose String value that is used in the creation of the default string description of an object. Called by the built-in method Object.prototype.toString.
    • SYMBOL_UNSCOPABLES

      public static final Symbol SYMBOL_UNSCOPABLES
      A property whose value is an Object whose own property names are property names that are excluded from the with environment bindings of the associated object.
  • Method Details

    • create

      public static Symbol create(com.oracle.truffle.api.strings.TruffleString description)
    • createRegistered

      public static Symbol createRegistered(com.oracle.truffle.api.strings.TruffleString description)
    • createPrivate

      public static Symbol createPrivate(com.oracle.truffle.api.strings.TruffleString description)
    • createPrivateRegistered

      public static Symbol createPrivateRegistered(com.oracle.truffle.api.strings.TruffleString description)
    • getDescription

      public Object getDescription()
    • getName

      public com.oracle.truffle.api.strings.TruffleString getName()
    • isRegistered

      public boolean isRegistered()
    • isPrivate

      public boolean isPrivate()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toTString

      public com.oracle.truffle.api.strings.TruffleString toTString()
    • toFunctionNameString

      public com.oracle.truffle.api.strings.TruffleString toFunctionNameString()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getInvertedMap

      public Map<WeakMap,Object> getInvertedMap()
    • setInvertedMap

      public void setInvertedMap(Map<WeakMap,Object> invMap)