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_CONSTNOT_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.
|
protected void |
fillConstructorProperties(IdFunctionObject ctor) |
protected int |
findPrototypeId(java.lang.String s) |
protected int |
findPrototypeId(Symbol key) |
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) |
protected void |
initPrototypeId(int id) |
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, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, findInstanceIdInfo, findInstanceIdInfo, get, get, getAttributes, getAttributes, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, setAttributes, setInstanceIdAttributes, setInstanceIdValueapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizepublic 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()
ScriptableObjectThis is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
getClassName in interface ScriptablegetClassName in class ScriptableObjectprotected void fillConstructorProperties(IdFunctionObject ctor)
fillConstructorProperties in class IdScriptableObjectprotected int findPrototypeId(java.lang.String s)
findPrototypeId in class IdScriptableObjectprotected int findPrototypeId(Symbol key)
findPrototypeId in class IdScriptableObjectprotected void initPrototypeId(int id)
initPrototypeId in class IdScriptableObjectpublic java.lang.Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
IdScriptableObjectexecIdCall in interface IdFunctionCallexecIdCall in class IdScriptableObjectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void put(java.lang.String name,
Scriptable start,
java.lang.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 IdScriptableObjectname - 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)
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, java.lang.Object value)
ScriptableObjectput in interface SymbolScriptableput in class IdScriptableObjectpublic boolean isSymbol()
public java.lang.String getTypeOf()
ScriptableObjectgetTypeOf in class ScriptableObjectScriptableObject.avoidObjectDetection() is true in
which case it returns "undefined"public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object x)
equals in class java.lang.Object