Package org.rapidcontext.core.js
Class ArrayWrapper
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.rapidcontext.core.js.ArrayWrapper
- All Implemented Interfaces:
- Serializable,- org.mozilla.javascript.ConstProperties,- org.mozilla.javascript.debug.DebuggableObject,- org.mozilla.javascript.Scriptable,- org.mozilla.javascript.SymbolScriptable,- org.mozilla.javascript.Wrapper
public final class ArrayWrapper
extends org.mozilla.javascript.ScriptableObject
implements org.mozilla.javascript.Wrapper
A JavaScript array wrapper. This class encapsulates an array and
 forwards all reads and modifications.
- Version:
- 1.0
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObjectorg.mozilla.javascript.ScriptableObject.KeyComparator
- 
Field SummaryFields inherited from class org.mozilla.javascript.ScriptableObjectCONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.mozilla.javascript.ScriptableNOT_FOUND
- 
Constructor SummaryConstructorsConstructorDescriptionArrayWrapper(Array arr, org.mozilla.javascript.Scriptable parentScope) Creates a new JavaScript array wrapper.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete(int index) Removes an indexed property from this object.get(int index, org.mozilla.javascript.Scriptable start) Returns an indexed property from this object.Returns a named property from this object.Returns the class name.booleanhas(int index, org.mozilla.javascript.Scriptable start) Checks if an index is defined in this object.booleanhasInstance(org.mozilla.javascript.Scriptable instance) Checks for JavaScript instance objects (always returns false).voidSets an indexed property in this object.voidSets a property in this object.unwrap()Returns the wrapped object.Methods inherited from class org.mozilla.javascript.ScriptableObjectapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChangeForSlot, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, equivalentValues, 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, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, 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, size
- 
Constructor Details- 
ArrayWrapperCreates a new JavaScript array wrapper.- Parameters:
- arr- the array object
- parentScope- the object parent scope
 
 
- 
- 
Method Details- 
getClassNameReturns the class name.- Specified by:
- getClassNamein interface- org.mozilla.javascript.Scriptable
- Specified by:
- getClassNamein class- org.mozilla.javascript.ScriptableObject
- Returns:
- the class name
 
- 
hasInstancepublic boolean hasInstance(org.mozilla.javascript.Scriptable instance) Checks for JavaScript instance objects (always returns false).- Specified by:
- hasInstancein interface- org.mozilla.javascript.Scriptable
- Overrides:
- hasInstancein class- org.mozilla.javascript.ScriptableObject
- Parameters:
- instance- the object to check
- Returns:
- always returns false (no instances possible)
 
- 
haspublic boolean has(int index, org.mozilla.javascript.Scriptable start) Checks if an index is defined in this object.- Specified by:
- hasin interface- org.mozilla.javascript.Scriptable
- Overrides:
- hasin class- org.mozilla.javascript.ScriptableObject
- Parameters:
- index- the index of the property
- start- the object in which the lookup began
- Returns:
- true if the index is defined, or false otherwise
 
- 
getReturns a named property from this object.- Specified by:
- getin interface- org.mozilla.javascript.Scriptable
- Overrides:
- getin class- org.mozilla.javascript.ScriptableObject
- Parameters:
- name- the name of the property
- start- the object in which the lookup began
- Returns:
- the value of the property, or NOT_FOUND if not found
 
- 
getReturns an indexed property from this object.- Specified by:
- getin interface- org.mozilla.javascript.Scriptable
- Overrides:
- getin class- org.mozilla.javascript.ScriptableObject
- Parameters:
- index- the index of the property
- start- the object in which the lookup began
- Returns:
- the value of the property, or NOT_FOUND if not found
 
- 
putSets a property in this object.- Specified by:
- putin interface- org.mozilla.javascript.Scriptable
- Overrides:
- putin class- org.mozilla.javascript.ScriptableObject
- Parameters:
- name- the name of the property
- start- the object in which the lookup began
- value- the value to set
 
- 
putSets an indexed property in this object.- Specified by:
- putin interface- org.mozilla.javascript.Scriptable
- Overrides:
- putin class- org.mozilla.javascript.ScriptableObject
- Parameters:
- index- the index of the property
- start- the object in which the lookup began
- value- the value to set
 
- 
deletepublic void delete(int index) Removes an indexed property from this object.- Specified by:
- deletein interface- org.mozilla.javascript.Scriptable
- Overrides:
- deletein class- org.mozilla.javascript.ScriptableObject
- Parameters:
- index- the index of the property
 
- 
unwrapReturns the wrapped object. Recursively replaces all JavaScript classes inside values and replaces them with the corresponding Java objects.- Specified by:
- unwrapin interface- org.mozilla.javascript.Wrapper
- Returns:
- the unwrapped object
 
 
-