public class NativeArray extends IdScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Constructor and Description |
|---|
NativeArray(long lengthArg) |
NativeArray(Object[] array) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(int index)
Removes the indexed property from the object.
|
Object |
execIdCall(IdFunctionObject f,
Context cx,
Scriptable scope,
Scriptable thisObj,
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 |
findInstanceIdInfo(String s)
Map name to id of instance property.
|
protected int |
findPrototypeId(String s) |
Object |
get(int index,
Scriptable start)
Returns the value of the indexed property or NOT_FOUND.
|
String |
getClassName()
Return the name of the class.
|
Object |
getDefaultValue(Class<?> hint)
Implements the [[DefaultValue]] internal method.
|
Object[] |
getIds()
Returns an array of ids for the properties of the object.
|
protected String |
getInstanceIdName(int id)
Map id back to property name it defines.
|
protected Object |
getInstanceIdValue(int id)
Get id value.
|
long |
getLength() |
protected int |
getMaxInstanceId()
Get maximum id findInstanceIdInfo can generate.
|
boolean |
has(int index,
Scriptable start)
Returns true if the property index is defined.
|
protected void |
initPrototypeId(int id) |
long |
jsGet_length()
Deprecated.
Use
getLength() instead. |
void |
put(int index,
Scriptable start,
Object value)
Sets the value of the indexed property, creating it if need be.
|
void |
put(String id,
Scriptable start,
Object value)
Sets the value of the named property, creating it if need be.
|
protected void |
setInstanceIdValue(int id,
Object value)
Set or delete id value.
|
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultPut, delete, exportAsJSClass, get, getAttributes, has, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeValue, instanceIdInfo, setAttributesassociateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, deleteProperty, deleteProperty, equivalentValues, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototypepublic NativeArray(long lengthArg)
public NativeArray(Object[] array)
public String getClassName()
ScriptableObjectgetClassName in interface ScriptablegetClassName in class ScriptableObjectprotected int getMaxInstanceId()
IdScriptableObjectgetMaxInstanceId in class IdScriptableObjectprotected int findInstanceIdInfo(String s)
IdScriptableObjectIdScriptableObject.instanceIdInfo(int, int).findInstanceIdInfo in class IdScriptableObjectprotected String getInstanceIdName(int id)
IdScriptableObjectgetInstanceIdName in class IdScriptableObjectprotected Object getInstanceIdValue(int id)
IdScriptableObjectgetInstanceIdValue in class IdScriptableObjectprotected void setInstanceIdValue(int id,
Object value)
IdScriptableObjectsetInstanceIdValue in class IdScriptableObjectprotected void fillConstructorProperties(IdFunctionObject ctor)
fillConstructorProperties in class IdScriptableObjectprotected void initPrototypeId(int id)
initPrototypeId in class IdScriptableObjectpublic Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
IdScriptableObjectexecIdCall in interface IdFunctionCallexecIdCall in class IdScriptableObjectpublic Object get(int index, Scriptable start)
ScriptableObjectget in interface Scriptableget in class ScriptableObjectindex - the numeric index for the propertystart - the object in which the lookup beganScriptable.get(String,Scriptable)public boolean has(int index,
Scriptable start)
ScriptableObjecthas in interface Scriptablehas in class ScriptableObjectindex - the numeric index for the propertystart - the object in which the lookup beganScriptable.get(int, Scriptable),
ScriptableObject.getProperty(Scriptable, int)public void put(String id, Scriptable start, 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 IdScriptableObjectid - 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 delete(int index)
ScriptableObjectdelete in interface Scriptabledelete in class ScriptableObjectindex - the numeric index for the propertyScriptable.get(int, Scriptable),
ScriptableObject.deleteProperty(Scriptable, int)public Object[] getIds()
ScriptableObjectAny properties with the attribute DONTENUM are not listed.
getIds in interface ScriptablegetIds in class ScriptableObjectpublic Object getDefaultValue(Class<?> hint)
ScriptableObjectNote that the toPrimitive conversion is a no-op for every type other than Object, for which [[DefaultValue]] is called. See ECMA 9.1.
A hint of null means "no hint".
getDefaultValue in interface ScriptablegetDefaultValue in class ScriptableObjecthint - the type hintpublic long getLength()
public long jsGet_length()
getLength() instead.protected int findPrototypeId(String s)
findPrototypeId in class IdScriptableObjectCopyright © 2015–2017 The veraPDF Consortium. All rights reserved.