public class NativeSymbol extends ScriptableObject implements Symbol
ScriptableObject.KeyComparator, ScriptableObject.LambdaGetterFunction, ScriptableObject.LambdaSetterFunction| Modifier and Type | Field and Description |
|---|---|
static String |
CLASS_NAME |
static String |
TYPE_NAME |
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Constructor and Description |
|---|
NativeSymbol(NativeSymbol s) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object x) |
String |
getClassName()
Return the name of the class.
|
String |
getName()
Returns the symbol's name.
|
String |
getTypeOf()
Gets the value that will be returned by calling the typeof operator on this object.
|
int |
hashCode() |
static void |
init(Context cx,
Scriptable scope,
boolean sealed) |
boolean |
isSymbol()
Object() on a Symbol constructs an object which is NOT a symbol, but which has an "internal
data slot" that is.
|
void |
put(int index,
Scriptable start,
Object value)
Sets the value of the indexed property, creating it if need be.
|
void |
put(String name,
Scriptable start,
Object value)
Sets the value of the named property, creating it if need be.
|
void |
put(Symbol key,
Scriptable start,
Object value)
Implementation of put required by SymbolScriptable objects.
|
String |
toString() |
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChangeForSlot, checkPropertyDefinition, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizecreateSlotMappublic static final String CLASS_NAME
public static final String TYPE_NAME
public NativeSymbol(NativeSymbol s)
public static void init(Context cx, Scriptable scope, boolean sealed)
public String getClassName()
ScriptableObjectThis is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
getClassName in interface ScriptablegetClassName in class ScriptableObjectpublic String getName()
Symbol()).public void put(String name, Scriptable start, Object value)
ScriptableObjectIf the property was created using defineProperty, the appropriate setter method is called.
If the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object.
put in interface Scriptableput in class ScriptableObjectname - the name of the propertystart - the object whose property is being setvalue - value to set the property toScriptable.has(String, Scriptable),
Scriptable.get(String, Scriptable),
ScriptableObject.putProperty(Scriptable, String, Object),
Context.toObject(Object, Scriptable)public void put(int index,
Scriptable start,
Object value)
ScriptableObjectput in interface Scriptableput in class ScriptableObjectindex - the numeric index for the propertystart - the object whose property is being setvalue - value to set the property toScriptable.has(int, Scriptable),
Scriptable.get(int, Scriptable),
ScriptableObject.putProperty(Scriptable, int, Object),
Context.toObject(Object, Scriptable)public void put(Symbol key, Scriptable start, Object value)
ScriptableObjectput in interface SymbolScriptableput in class ScriptableObjectpublic boolean isSymbol()
public String getTypeOf()
ScriptableObjectgetTypeOf in class ScriptableObjectScriptableObject.avoidObjectDetection() is true in
which case it returns "undefined"Copyright © 2025 HtmlUnit. All rights reserved.