NativeInt32Array

The Int32Array view: 4 bytes per element.

Constructors

Link copied to clipboard
constructor()
constructor(ab: NativeArrayBuffer, off: Int, len: Int)
constructor(len: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val allIds: Array<Any?>

Every property, enumerable or not.

Link copied to clipboard
open override val arrayLength: Int

How many elements there are.

Link copied to clipboard
Link copied to clipboard

How much of the buffer the view covers, in bytes. Upstream's getByteLength (D-7).

Link copied to clipboard
open override val bytesPerElement: Int
Link copied to clipboard
open override val className: String

The class name, as Object.prototype.toString reports it.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val offset: Int

Where in the buffer the view starts, in bytes. Upstream's getByteOffset (D-7).

Link copied to clipboard
open override var parentScope: Scriptable?
Link copied to clipboard
open override var prototype: Scriptable?
Link copied to clipboard
open val typeOf: String

What typeof says about this object.

Functions

Link copied to clipboard
fun associateValue(key: Any, value: Any): Any

Parks value under key, or returns what is already there.

Link copied to clipboard

True for an object that has to pretend it is undefined, which only NativeWith does.

Link copied to clipboard
fun defineBuiltinProperty(scope: Scriptable, name: String, length: Int, target: SerializableCallable, attributes: Int = DONTENUM, propertyAttributes: Int = DONTENUM or READONLY)

Same as above for a built-in method, which does not get a prototype property.

Link copied to clipboard
open override fun defineConst(name: String, start: Scriptable)
Link copied to clipboard
Link copied to clipboard
fun defineProperty(key: Symbol, value: Any?, attributes: Int)
fun defineProperty(propertyName: String, value: Any?, attributes: Int)

fun defineProperty(name: String, getter: () -> Any??, setter: (Any?) -> Unit?, attributes: Int)

Defines a property whose value comes from a lambda that needs nothing but itself.

fun defineProperty(scope: Scriptable, name: String, length: Int, target: SerializableCallable, attributes: Int = DONTENUM, propertyAttributes: Int = DONTENUM or READONLY)

Defines a method backed by a Kotlin lambda.

Link copied to clipboard
open override fun delete(key: Symbol)
open override fun delete(index: Int)
open override fun delete(name: String)
Link copied to clipboard
operator fun get(key: Any?): Any?
open override fun get(key: Symbol, start: Scriptable): Any?

open override fun get(index: Int, start: Scriptable): Any?

Gets an indexed property, or NOT_FOUND when there is none.

open override fun get(name: String, start: Scriptable): Any?

Gets a named property, or NOT_FOUND when there is none.

Link copied to clipboard
open override fun getArrayElement(index: Int): Any?

The element at index. It has to be a type script understands: a number, a string or a Scriptable. Never called with an out-of-range index.

Link copied to clipboard

A value another part of the engine parked on this object under key.

Link copied to clipboard
open fun getAttributes(sym: Symbol): Int
open fun getAttributes(index: Int): Int
open fun getAttributes(name: String): Int
Link copied to clipboard
open override fun getDefaultValue(hint: KClass<*>?): Any?

Converts this object to a primitive, guided by hint.

Link copied to clipboard
fun getGetterOrSetter(name: String?, index: Int, scope: Scriptable, isSetter: Boolean): Any?
Link copied to clipboard
open override fun getIds(): Array<Any?>

Every property name of this object alone, ignoring the prototype chain.

Link copied to clipboard
open override fun has(key: Symbol, start: Scriptable): Boolean
open override fun has(index: Int, start: Scriptable): Boolean
open override fun has(name: String, start: Scriptable): Boolean
Link copied to clipboard
open override fun hasInstance(instance: Scriptable): Boolean

Backs the instanceof operator.

Link copied to clipboard
open override fun isConst(name: String): Boolean
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun put(key: Symbol, start: Scriptable, value: Any?)
open override fun put(index: Int, start: Scriptable, value: Any?)
open override fun put(name: String, start: Scriptable, value: Any?)
Link copied to clipboard
open override fun putConst(name: String, start: Scriptable, value: Any?)
Link copied to clipboard

Seals the object, so no property can be added, removed or changed.

Link copied to clipboard
open override fun setArrayElement(index: Int, value: Any?)

Writes value at index. Never called with an out-of-range index. The implementation checks the type of value and converts it if it has to.

Link copied to clipboard
fun setAttributes(key: Symbol, attributes: Int)
fun setAttributes(index: Int, attributes: Int)
open fun setAttributes(name: String, attributes: Int)
Link copied to clipboard

Attaches data that lives outside the engine, or detaches it with null.

Link copied to clipboard
fun setGetterOrSetter(name: Any?, index: Int, getterOrSetter: Callable?, isSetter: Boolean)
Link copied to clipboard
open fun size(): Int

Part of what java.util.Map needs. NativeObject finishes the job.