public class NativeSymbol extends IdScriptableObject implements Symbol
ScriptableObject.KeyComparator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME |
static java.lang.String |
TYPE_NAME |
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
NOT_FOUND
Constructor and Description |
---|
NativeSymbol(NativeSymbol s) |
Modifier and Type | Method and Description |
---|---|
static NativeSymbol |
construct(Context cx,
Scriptable scope,
java.lang.Object[] args)
Use this when we need to create symbols internally because of the convoluted way we have to
construct them.
|
boolean |
equals(java.lang.Object x) |
java.lang.Object |
execIdCall(IdFunctionObject f,
Context cx,
Scriptable scope,
Scriptable thisObj,
java.lang.Object[] args)
'thisObj' will be null if invoked as constructor, in which case
instance of Scriptable should be returned.
|
java.lang.String |
getClassName()
Return the name of the class.
|
java.lang.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,
java.lang.Object value)
Sets the value of the indexed property, creating it if need be.
|
void |
put(java.lang.String name,
Scriptable start,
java.lang.Object value)
Sets the value of the named property, creating it if need be.
|
void |
put(Symbol key,
Scriptable start,
java.lang.Object value)
Implementation of put required by SymbolScriptable objects.
|
java.lang.String |
toString() |
activatePrototypeMap, defineOwnProperty, delete, delete, exportAsJSClass, get, get, getAttributes, getAttributes, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, setAttributes
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasInstance, hasProperty, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public static final java.lang.String CLASS_NAME
public static final java.lang.String TYPE_NAME
public NativeSymbol(NativeSymbol s)
public static void init(Context cx, Scriptable scope, boolean sealed)
public static NativeSymbol construct(Context cx, Scriptable scope, java.lang.Object[] args)
public java.lang.String getClassName()
ScriptableObject
getClassName
in interface Scriptable
getClassName
in class ScriptableObject
public java.lang.Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
IdScriptableObject
execIdCall
in interface IdFunctionCall
execIdCall
in class IdScriptableObject
public java.lang.String toString()
toString
in class java.lang.Object
public void put(java.lang.String name, Scriptable start, java.lang.Object value)
ScriptableObject
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 Scriptable
put
in class IdScriptableObject
name
- 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, java.lang.Object value)
ScriptableObject
put
in interface Scriptable
put
in class ScriptableObject
index
- 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, java.lang.Object value)
ScriptableObject
put
in interface SymbolScriptable
put
in class IdScriptableObject
public boolean isSymbol()
public java.lang.String getTypeOf()
ScriptableObject
getTypeOf
in class ScriptableObject
ScriptableObject.avoidObjectDetection()
is true
in which
case it returns "undefined"public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object
Copyright © 2010 - 2023 Adobe. All Rights Reserved