Added in API level 23
Deprecated in API level 31

Closure


class Closure : BaseObj

An opaque class for closures

A closure represents a function call to a kernel or invocable function, combined with arguments and values for global variables. A closure is created using the android.renderscript.ScriptGroup.Builder2#addKernel or android.renderscript.ScriptGroup.Builder2#addInvoke method.

Summary

Public methods
Unit

Destroys this Closure and the Allocation for its return value

ScriptGroup.Future!

Returns the future for a global variable

ScriptGroup.Future!

Returns the future for the return value

Protected methods
Unit

Inherited functions
Boolean equals(other: Any?)

Compare the current BaseObj with another BaseObj for equality.

String! getName()

Int hashCode()

Calculates the hash code value for a BaseObj.

Unit setName(name: String!)

setName assigns a name to an object. This object can later be looked up by this name.

Public methods

destroy

Added in API level 23
fun destroy(): Unit

Deprecated: Deprecated in Java.

Destroys this Closure and the Allocation for its return value

getGlobal

Added in API level 23
fun getGlobal(field: Script.FieldID!): ScriptGroup.Future!

Deprecated: Deprecated in Java.

Returns the future for a global variable

Parameters
field Script.FieldID!: the field ID for the global variable
Return
ScriptGroup.Future! a future

getReturn

Added in API level 23
fun getReturn(): ScriptGroup.Future!

Deprecated: Deprecated in Java.

Returns the future for the return value

Return
ScriptGroup.Future! a future

Protected methods

finalize

Added in API level 23
protected fun finalize(): Unit

Deprecated: Deprecated in Java.

Exceptions
java.lang.Throwable the Exception raised by this method