public interface Value extends Persistable
Callback
annotation.Modifier and Type | Method and Description |
---|---|
java.lang.Object |
apply(Context context,
Arguments arguments)
This is called when the code running on a machine tries to index this
value.
|
java.lang.Object[] |
call(Context context,
Arguments arguments)
This is called when the code running on a machine tries to call this
value as a function.
|
void |
dispose(Context context)
This is called when the object's representation in the machine it was
pushed to is garbage collected.
|
void |
unapply(Context context,
Arguments arguments)
This is called when the code running on a machine tries to assign a new
value at the specified index of this value.
|
load, save
java.lang.Object apply(Context context, Arguments arguments)
context
- the context from which the method is called, usually the
instance of the computer running the script that made
the call.arguments
- the arguments passed to the method.void unapply(Context context, Arguments arguments)
context
- the context from which the method is called, usually the
instance of the computer running the script that made
the call.arguments
- the arguments passed to the method.java.lang.Object[] call(Context context, Arguments arguments)
context
- the context from which the method is called, usually the
instance of the computer running the script that made
the call.arguments
- the arguments passed to the method.java.lang.RuntimeException
- if this value is not callable.void dispose(Context context)
context
- the context from which the method is called, usually the
instance of the computer running the script that just
garbage collected the object.