public abstract class IdScriptableObject extends ScriptableObject implements IdFunctionCall
ScriptableObject.KeyComparatorCONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Constructor and Description |
|---|
IdScriptableObject() |
IdScriptableObject(Scriptable scope,
Scriptable prototype) |
| Modifier and Type | Method and Description |
|---|---|
void |
activatePrototypeMap(int maxPrototypeId) |
void |
defineOwnProperty(Context cx,
java.lang.Object key,
ScriptableObject desc)
Defines a property on an object.
|
void |
delete(java.lang.String name)
Removes a named property from the object.
|
void |
delete(Symbol key)
Removes an object like the others, but using a Symbol as the key.
|
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.
|
IdFunctionObject |
exportAsJSClass(int maxPrototypeId,
Scriptable scope,
boolean sealed) |
java.lang.Object |
get(java.lang.String name,
Scriptable start)
Returns the value of the named property or NOT_FOUND.
|
java.lang.Object |
get(Symbol key,
Scriptable start)
Another version of Get that supports Symbol keyed properties.
|
int |
getAttributes(java.lang.String name)
Get the attributes of a named property.
|
int |
getAttributes(Symbol key) |
boolean |
has(java.lang.String name,
Scriptable start)
Returns true if the named property is defined.
|
boolean |
has(Symbol key,
Scriptable start)
A version of "has" that supports symbols.
|
boolean |
hasPrototypeMap() |
void |
initPrototypeConstructor(IdFunctionObject f) |
IdFunctionObject |
initPrototypeMethod(java.lang.Object tag,
int id,
java.lang.String name,
int arity) |
IdFunctionObject |
initPrototypeMethod(java.lang.Object tag,
int id,
java.lang.String propertyName,
java.lang.String functionName,
int arity) |
IdFunctionObject |
initPrototypeMethod(java.lang.Object tag,
int id,
Symbol key,
java.lang.String functionName,
int arity) |
void |
initPrototypeValue(int id,
java.lang.String name,
java.lang.Object value,
int attributes) |
void |
initPrototypeValue(int id,
Symbol key,
java.lang.Object value,
int attributes) |
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.
|
void |
setAttributes(java.lang.String name,
int attributes)
Set the attributes of a named property.
|
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, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasInstance, hasProperty, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizepublic IdScriptableObject()
public IdScriptableObject(Scriptable scope, Scriptable prototype)
public boolean has(java.lang.String name,
Scriptable start)
ScriptableObjecthas in interface Scriptablehas in class ScriptableObjectname - the name of the propertystart - the object in which the lookup beganScriptable.get(String, Scriptable),
ScriptableObject.getProperty(Scriptable, String)public boolean has(Symbol key, Scriptable start)
ScriptableObjecthas in interface SymbolScriptablehas in class ScriptableObjectpublic java.lang.Object get(java.lang.String name,
Scriptable start)
ScriptableObjectget in interface Scriptableget in class ScriptableObjectname - the name of the propertystart - the object in which the lookup beganContext.getUndefinedValue()public java.lang.Object get(Symbol key, Scriptable start)
ScriptableObjectget in interface SymbolScriptableget in class ScriptableObjectpublic void put(java.lang.String name,
Scriptable start,
java.lang.Object value)
ScriptableObjectIf 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(Symbol key, Scriptable start, java.lang.Object value)
ScriptableObjectput in interface SymbolScriptableput in class ScriptableObjectpublic void delete(java.lang.String name)
ScriptableObjectdelete in interface Scriptabledelete in class ScriptableObjectname - the name of the propertyScriptable.get(String, Scriptable),
ScriptableObject.deleteProperty(Scriptable, String)public void delete(Symbol key)
ScriptableObjectdelete in interface SymbolScriptabledelete in class ScriptableObjectpublic int getAttributes(java.lang.String name)
ScriptableObjectname
as defined for has.getAttributes in class ScriptableObjectname - the identifier for the propertyScriptableObject.has(String, Scriptable),
ScriptableObject.READONLY,
ScriptableObject.DONTENUM,
ScriptableObject.PERMANENT,
ScriptableObject.EMPTYpublic int getAttributes(Symbol key)
getAttributes in class ScriptableObjectpublic void setAttributes(java.lang.String name,
int attributes)
ScriptableObjectname
as defined for has.The possible attributes are READONLY, DONTENUM, and PERMANENT. Combinations of attributes are expressed by the bitwise OR of attributes. EMPTY is the state of no attributes set. Any unused bits are reserved for future use.
setAttributes in class ScriptableObjectname - the name of the propertyattributes - the bitset of attributesScriptable.has(String, Scriptable),
ScriptableObject.READONLY,
ScriptableObject.DONTENUM,
ScriptableObject.PERMANENT,
ScriptableObject.EMPTYpublic java.lang.Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
execIdCall in interface IdFunctionCallpublic final IdFunctionObject exportAsJSClass(int maxPrototypeId, Scriptable scope, boolean sealed)
public final boolean hasPrototypeMap()
public final void activatePrototypeMap(int maxPrototypeId)
public final IdFunctionObject initPrototypeMethod(java.lang.Object tag, int id, java.lang.String name, int arity)
public final IdFunctionObject initPrototypeMethod(java.lang.Object tag, int id, java.lang.String propertyName, java.lang.String functionName, int arity)
public final IdFunctionObject initPrototypeMethod(java.lang.Object tag, int id, Symbol key, java.lang.String functionName, int arity)
public final void initPrototypeConstructor(IdFunctionObject f)
public final void initPrototypeValue(int id,
java.lang.String name,
java.lang.Object value,
int attributes)
public final void initPrototypeValue(int id,
Symbol key,
java.lang.Object value,
int attributes)
public void defineOwnProperty(Context cx, java.lang.Object key, ScriptableObject desc)
ScriptableObjectdefineOwnProperty in class ScriptableObjectcx - the current Contextkey - the name/index of the propertydesc - the new property descriptor, as described in 8.6.1Copyright © 2010 - 2023 Adobe. All Rights Reserved