Class NativeArrayBufferView
java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.IdScriptableObject
org.htmlunit.corejs.javascript.typedarrays.NativeArrayBufferView
- All Implemented Interfaces:
Serializable,ConstProperties,DebuggableObject,IdFunctionCall,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.htmlunit.corejs.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 useprivate static final intprivate static final intprivate static final intprotected static final intprotected final intThe offset, in bytes, from the start of the backing arrayprivate static final longprivate static BooleanFields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNativeArrayBufferView(NativeArrayBuffer ab, int offset, int byteLength) -
Method Summary
Modifier and TypeMethodDescriptionprotected intMap name to id of instance property.get(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 StringgetInstanceIdName(int id) Map id back to property name it defines.protected ObjectgetInstanceIdValue(int id) Get id value.protected intGet maximum id findInstanceIdInfo can generate.protected static booleanprotected static booleanMethods inherited from class org.htmlunit.corejs.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, execIdCall, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, findPrototypeId, get, getAttributes, getAttributes, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeId, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributes, setInstanceIdAttributes, setInstanceIdValueMethods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
useLittleEndian
-
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 -
Id_buffer
private static final int Id_buffer- See Also:
-
Id_byteOffset
private static final int Id_byteOffset- See Also:
-
Id_byteLength
private static final int Id_byteLength- See Also:
-
MAX_INSTANCE_ID
protected static final int MAX_INSTANCE_ID- See Also:
-
-
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
-
getMaxInstanceId
protected int getMaxInstanceId()Description copied from class:IdScriptableObjectGet maximum id findInstanceIdInfo can generate.- Overrides:
getMaxInstanceIdin classIdScriptableObject
-
getInstanceIdName
Description copied from class:IdScriptableObjectMap id back to property name it defines.- Overrides:
getInstanceIdNamein classIdScriptableObject
-
getInstanceIdValue
Description copied from class:IdScriptableObjectGet id value. * If id value is constant, descendant can call cacheIdValue to store * value in the permanent cache. * Default implementation creates IdFunctionObject instance for given id * and cache its value- Overrides:
getInstanceIdValuein classIdScriptableObject
-
findInstanceIdInfo
Description copied from class:IdScriptableObjectMap name to id of instance property. Should return 0 if not found or the result ofIdScriptableObject.instanceIdInfo(int, int).- Overrides:
findInstanceIdInfoin classIdScriptableObject
-
get
Description copied from class:ScriptableObjectAnother version of Get that supports Symbol keyed properties.- Specified by:
getin interfaceSymbolScriptable- Overrides:
getin classIdScriptableObject
-