Class JSStringObject

All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject

public final class JSStringObject extends JSNonProxyObject
  • Constructor Details

    • JSStringObject

      protected JSStringObject(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, com.oracle.truffle.api.strings.TruffleString string)
  • Method Details

    • getString

      public com.oracle.truffle.api.strings.TruffleString getString()
    • create

      public static JSStringObject create(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, com.oracle.truffle.api.strings.TruffleString value)
    • getClassName

      public com.oracle.truffle.api.strings.TruffleString getClassName()
      Description copied from class: JSDynamicObject
      The [[Class]] internal property. For ES5, this is the second part of what Object.prototype.toString.call(myObj) returns, e.g. "[object Array]".
      Overrides:
      getClassName in class JSNonProxyObject
    • getBuiltinToStringTag

      public com.oracle.truffle.api.strings.TruffleString getBuiltinToStringTag()
      Description copied from class: JSObject
      Returns builtinTag as per Object.prototype.toString(). By default returns "Object".
      Overrides:
      getBuiltinToStringTag in class JSObject
      Returns:
      built-in toStringTag
    • isString

      public boolean isString()
    • asString

      public String asString()
    • toDisplayStringImpl

      public com.oracle.truffle.api.strings.TruffleString toDisplayStringImpl(boolean allowSideEffects, ToDisplayStringFormat format, int depth)
      Description copied from class: JSDynamicObject
      A more informative toString variant, mainly used for error messages.
      Overrides:
      toDisplayStringImpl in class JSNonProxyObject
      Parameters:
      format - formatting parameters
      depth - current nesting depth