Class NativeArrayBufferView
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.typedarrays.NativeArrayBufferView
- All Implemented Interfaces:
Serializable,ConstProperties,DebuggableObject,Scriptable,SymbolScriptable
- Direct Known Subclasses:
NativeDataView,NativeTypedArrayView
This class is the abstract parent for all views of the array. It shows a view of the underlying
NativeArrayBuffer. Many views may simultaneously share the same buffer, and changes to one will
affect all.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject
ScriptableObject.KeyComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final NativeArrayBufferMany view objects can share the same backing arrayprotected final intThe length, in bytes, of the portion of the backing array that we useprotected final intThe offset, in bytes, from the start of the backing arrayFields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNativeArrayBufferView(NativeArrayBuffer ab, int offset, int byteLength) -
Method Summary
Modifier and TypeMethodDescriptionget(Symbol key, Scriptable start) Another version of Get that supports Symbol keyed properties.Return the buffer that backs this view.intReturn the length, in bytes, of the part of the buffer that this view represents.intReturn the offset in bytes from the start of the buffer that this view represents.protected static booleanprotected static booleanMethods inherited from class org.mozilla.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
Field Details
-
arrayBuffer
Many view objects can share the same backing array -
offset
protected final int offsetThe offset, in bytes, from the start of the backing array -
byteLength
protected final int byteLengthThe length, in bytes, of the portion of the backing array that we use
-
-
Constructor Details
-
NativeArrayBufferView
public NativeArrayBufferView() -
NativeArrayBufferView
-
-
Method Details
-
getBuffer
Return the buffer that backs this view. -
getByteOffset
public int getByteOffset()Return the offset in bytes from the start of the buffer that this view represents. -
getByteLength
public int getByteLength()Return the length, in bytes, of the part of the buffer that this view represents. -
useLittleEndian
protected static boolean useLittleEndian() -
isArg
-
get
Description copied from class:ScriptableObjectAnother version of Get that supports Symbol keyed properties.- Specified by:
getin interfaceSymbolScriptable- Overrides:
getin classScriptableObject
-