Class NativeInt16Array
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.IdScriptableObject
org.mozilla.javascript.typedarrays.NativeArrayBufferView
org.mozilla.javascript.typedarrays.NativeTypedArrayView<Short>
org.mozilla.javascript.typedarrays.NativeInt16Array
- All Implemented Interfaces:
Serializable, Iterable<Short>, Collection<Short>, List<Short>, RandomAccess, SequencedCollection<Short>, ConstProperties, DebuggableObject, ExternalArrayData, IdFunctionCall, Scriptable, SymbolScriptable
An array view that stores 16-bit quantities and implements the JavaScript "Int16Array" interface.
It also implements List<Short> for direct manipulation in Java.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ScriptableObject
ScriptableObject.KeyComparator -
Field Summary
Fields inherited from class NativeTypedArrayView
length, MAX_PROTOTYPE_IDFields inherited from class NativeArrayBufferView
arrayBuffer, byteLength, offsetFields inherited from class ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionNativeInt16Array(int len) NativeInt16Array(NativeArrayBuffer ab, int off, int len) -
Method Summary
Modifier and TypeMethodDescriptionprotected NativeInt16Arrayconstruct(NativeArrayBuffer ab, int off, int len) get(int i) intReturn the number of bytes represented by each element in the array.Return the name of the class.static voidinit(Context cx, Scriptable scope, boolean sealed) protected Objectjs_get(int index) protected Objectprotected NativeInt16ArrayrealThis(Scriptable thisObj, IdFunctionObject f) Methods inherited from class NativeTypedArrayView
add, add, addAll, addAll, checkIndex, clear, contains, containsAll, delete, delete, equals, execIdCall, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, findPrototypeId, get, get, getArrayElement, getArrayLength, getIds, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, has, has, hashCode, indexOf, initPrototypeId, isEmpty, iterator, lastIndexOf, listIterator, listIterator, put, put, remove, remove, removeAll, retainAll, setArrayElement, size, subList, toArray, toArrayMethods inherited from class NativeArrayBufferView
get, getBuffer, getByteLength, getByteOffset, isArg, useLittleEndianMethods inherited from class IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, ensureType, exportAsJSClass, findInstanceIdInfo, getAttributes, getAttributes, getOwnPropertyDescriptor, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdAttributes, setInstanceIdValueMethods inherited from class ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototypeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
NativeInt16Array
public NativeInt16Array() -
NativeInt16Array
-
NativeInt16Array
public NativeInt16Array(int len)
-
-
Method Details
-
getClassName
Description copied from class:ScriptableObjectReturn the name of the class.This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
- Specified by:
getClassNamein interfaceScriptable- Specified by:
getClassNamein classScriptableObject
-
init
-
construct
- Specified by:
constructin classNativeTypedArrayView<Short>
-
getBytesPerElement
public int getBytesPerElement()Description copied from class:NativeTypedArrayViewReturn the number of bytes represented by each element in the array. This can be useful when wishing to manipulate the byte array directly from Java.- Specified by:
getBytesPerElementin classNativeTypedArrayView<Short>
-
realThis
- Specified by:
realThisin classNativeTypedArrayView<Short>
-
js_get
- Specified by:
js_getin classNativeTypedArrayView<Short>
-
js_set
- Specified by:
js_setin classNativeTypedArrayView<Short>
-
get
-
set
-