public final class JSString extends JSPrimitive implements JSConstructorFactory.WithFunctions
| Type | Property and Description |
|---|---|
boolean |
usesOrdinaryGetOwn |
| Modifier and Type | Class and Description |
|---|---|
static class |
JSString.StringLengthProxyProperty |
JSConstructorFactory.Default, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpecies| Modifier and Type | Field and Description |
|---|---|
static String |
CLASS_NAME |
static String |
CLASS_NAME_EXTENSIONS |
static JSString |
INSTANCE |
static com.oracle.truffle.api.object.HiddenKey |
ITERATED_STRING_ID |
static String |
ITERATOR_CLASS_NAME |
static String |
ITERATOR_PROTOTYPE_NAME |
static String |
LENGTH |
static String |
PROTOTYPE_NAME |
static String |
REGEXP_ITERATOR_CLASS_NAME |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_DONE_ID |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_GLOBAL_ID |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_ITERATED_STRING_ID |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_ITERATING_REGEXP_ID |
static String |
REGEXP_ITERATOR_PROTOTYPE_NAME |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_UNICODE_ID |
static com.oracle.truffle.api.object.HiddenKey |
STRING_ITERATOR_NEXT_INDEX_ID |
static String |
TYPE_NAME |
EMPTY_STRING_ARRAY| Modifier and Type | Method and Description |
|---|---|
static com.oracle.truffle.api.object.DynamicObject |
create(JSContext context,
CharSequence value) |
static JSConstructor |
createConstructor(JSRealm realm) |
com.oracle.truffle.api.object.DynamicObject |
createPrototype(JSRealm realm,
com.oracle.truffle.api.object.DynamicObject ctor) |
boolean |
defineOwnProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key,
PropertyDescriptor desc,
boolean doThrow)
9.1.6 [[DefineOwnProperty]] (P, Desc).
|
boolean |
delete(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key,
boolean isStrict)
9.1.10 [[Delete]] (P).
|
String |
getBuiltinToStringTag(com.oracle.truffle.api.object.DynamicObject object)
Returns builtinTag from step 14 of ES6+ 19.1.3.6.
|
static CharSequence |
getCharSequence(com.oracle.truffle.api.object.DynamicObject obj) |
String |
getClassName() |
String |
getClassName(com.oracle.truffle.api.object.DynamicObject object)
The [[Class]] internal property.
|
com.oracle.truffle.api.object.DynamicObject |
getIntrinsicDefaultProto(JSRealm realm) |
Object |
getOwnHelper(com.oracle.truffle.api.object.DynamicObject store,
Object thisObj,
long index)
Like getOwnProperty, but returns
null if value is not present instead of undefined. |
Object |
getOwnHelper(com.oracle.truffle.api.object.DynamicObject store,
Object thisObj,
Object key)
Like getOwnProperty, but returns
null if value is not present instead of undefined. |
PropertyDescriptor |
getOwnProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key)
9.1.5 [[GetOwnProperty]] (P).
|
List<Object> |
getOwnPropertyKeys(com.oracle.truffle.api.object.DynamicObject thisObj,
boolean strings,
boolean symbols)
GetOwnPropertyKeys (O, type).
|
static String |
getString(com.oracle.truffle.api.object.DynamicObject obj) |
static int |
getStringLength(com.oracle.truffle.api.object.DynamicObject obj) |
boolean |
hasOwnProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
long index) |
boolean |
hasOwnProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key) |
static boolean |
isJSString(Object obj) |
com.oracle.truffle.api.object.Shape |
makeInitialShape(JSContext context,
com.oracle.truffle.api.object.DynamicObject prototype) |
boolean |
set(com.oracle.truffle.api.object.DynamicObject thisObj,
long index,
Object value,
Object receiver,
boolean isStrict) |
boolean |
set(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key,
Object value,
Object receiver,
boolean isStrict)
9.1.9 [[Set]] (P, V, Receiver).
|
static PropertyDescriptor |
stringGetIndexProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key)
ES6, 9.4.3.1.1 StringGetIndexProperty (S, P).
|
String |
toDisplayStringImpl(com.oracle.truffle.api.object.DynamicObject obj,
int depth,
boolean allowSideEffects,
JSContext context)
A more informative toString variant, mainly used for error messages.
|
boolean |
usesOrdinaryGetOwnProperty() |
getHelper, getMethodHelpercheckProtoCycle, createSymbolSpeciesGetterFunction, delete, deletePropertyDefault, getHelper, getPrototypeOf, hasOnlyShapeProperties, hasProperty, hasProperty, invokeAccessorPropertySetter, isExtensible, ordinaryGetOwnProperty, ordinaryGetOwnPropertyIntl, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeysSlow, ordinarySet, ordinarySetIndex, ordinarySetWithReceiver, performOrdinarySetWithOwnDescriptor, preventExtensions, preventExtensionsImpl, putConstructorSpeciesGetter, setIntegrityLevel, setIntegrityLevelFast, setPropertySlow, setPrototypeOf, testIntegrityLevel, testIntegrityLevelFast, toString, usesOrdinaryIsExtensibledefaultToString, filterOwnPropertyKeys, formatToString, get, get, getToStringTag, isInstance, isInstance, isInstance, isInstance, ownPropertyKeys, testIntegrityLevelDefaultdispatch, equals, hashCode, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateConstructorAndPrototypecreateConstructorObject, fillConstructorpublic boolean usesOrdinaryGetOwnProperty
usesOrdinaryGetOwnProperty in class JSNonProxypublic static final JSString INSTANCE
public static final String TYPE_NAME
public static final String CLASS_NAME
public static final String PROTOTYPE_NAME
public static final String CLASS_NAME_EXTENSIONS
public static final String LENGTH
public static final String ITERATOR_CLASS_NAME
public static final String ITERATOR_PROTOTYPE_NAME
public static final com.oracle.truffle.api.object.HiddenKey ITERATED_STRING_ID
public static final com.oracle.truffle.api.object.HiddenKey STRING_ITERATOR_NEXT_INDEX_ID
public static final String REGEXP_ITERATOR_CLASS_NAME
public static final String REGEXP_ITERATOR_PROTOTYPE_NAME
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_ITERATING_REGEXP_ID
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_ITERATED_STRING_ID
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_GLOBAL_ID
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_UNICODE_ID
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_DONE_ID
public static com.oracle.truffle.api.object.DynamicObject create(JSContext context, CharSequence value)
public boolean hasOwnProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key)
hasOwnProperty in class JSNonProxypublic static CharSequence getCharSequence(com.oracle.truffle.api.object.DynamicObject obj)
public static String getString(com.oracle.truffle.api.object.DynamicObject obj)
public static int getStringLength(com.oracle.truffle.api.object.DynamicObject obj)
public boolean hasOwnProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
long index)
hasOwnProperty in class JSNonProxypublic Object getOwnHelper(com.oracle.truffle.api.object.DynamicObject store, Object thisObj, Object key)
JSNonProxynull if value is not present instead of undefined.getOwnHelper in class JSNonProxypublic Object getOwnHelper(com.oracle.truffle.api.object.DynamicObject store, Object thisObj, long index)
JSNonProxynull if value is not present instead of undefined.getOwnHelper in class JSNonProxypublic boolean set(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key,
Object value,
Object receiver,
boolean isStrict)
JSClassset in class JSNonProxypublic boolean set(com.oracle.truffle.api.object.DynamicObject thisObj,
long index,
Object value,
Object receiver,
boolean isStrict)
set in class JSNonProxypublic List<Object> getOwnPropertyKeys(com.oracle.truffle.api.object.DynamicObject thisObj, boolean strings, boolean symbols)
JSClassgetOwnPropertyKeys in class JSNonProxypublic boolean delete(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key,
boolean isStrict)
JSClassdelete in class JSNonProxypublic com.oracle.truffle.api.object.DynamicObject createPrototype(JSRealm realm, com.oracle.truffle.api.object.DynamicObject ctor)
createPrototype in interface JSConstructorFactorypublic com.oracle.truffle.api.object.Shape makeInitialShape(JSContext context, com.oracle.truffle.api.object.DynamicObject prototype)
makeInitialShape in class JSClasspublic static JSConstructor createConstructor(JSRealm realm)
public String getClassName()
getClassName in interface JSConstructorFactorypublic String getClassName(com.oracle.truffle.api.object.DynamicObject object)
JSClassgetClassName in class JSClassobject - object to be usedpublic String getBuiltinToStringTag(com.oracle.truffle.api.object.DynamicObject object)
JSClassgetBuiltinToStringTag in class JSNonProxyobject - object to be usedJSClass.defaultToString(DynamicObject)public String toDisplayStringImpl(com.oracle.truffle.api.object.DynamicObject obj, int depth, boolean allowSideEffects, JSContext context)
JSClasstoDisplayStringImpl in class JSNonProxydepth - allowed nesting depthcontext - the current language contextpublic static boolean isJSString(Object obj)
public PropertyDescriptor getOwnProperty(com.oracle.truffle.api.object.DynamicObject thisObj, Object key)
JSClassgetOwnProperty in class JSNonProxypublic boolean usesOrdinaryGetOwnProperty()
usesOrdinaryGetOwnProperty in class JSNonProxypublic boolean defineOwnProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key,
PropertyDescriptor desc,
boolean doThrow)
JSClassdefineOwnProperty in class JSNonProxypublic static PropertyDescriptor stringGetIndexProperty(com.oracle.truffle.api.object.DynamicObject thisObj, Object key)
public com.oracle.truffle.api.object.DynamicObject getIntrinsicDefaultProto(JSRealm realm)
getIntrinsicDefaultProto in interface PrototypeSupplier