public interface Instance<T> extends ObjectValue, JsonValue
| Modifier and Type | Method and Description |
|---|---|
static <T> Instance |
cast(Instance from,
String toClass)
Casts a the object that is contained in a Instance to an object of class clazz.
|
static <T> Instance |
cloneInstance(Instance from)
Clones a Instance
|
Instance |
field(String fieldName)
Retrieves the instance held under the Field fieldName
|
void |
initializeCallbackChannel(long channelAddress)
Initialize a callback channel for this
Instance. |
Instance |
invoke(String methodName,
InvocationArg... args)
Invokes a method of the instance of the class that is set for this
Instance |
void |
invokeAsync(long functionPointerAddress,
String methodName,
InvocationArg... args)
Invokes asynchronously a method of the instance of the class that is set for this
Instance. |
Instance |
invokeStatic(String methodName,
InvocationArg... args)
Invokes a static method of the class that is set for this
Instance |
void |
invokeToChannel(long channelAddress,
String methodName,
InvocationArg... args)
Invokes a method of the instance of the class that is set for this
Instance. |
getObject, getObjectClassInstance invoke(String methodName, InvocationArg... args)
InstancemethodName - The method nameargs - The arguments to use for invoking the methodInstance instance containing the result of the invocationInstance invokeStatic(String methodName, InvocationArg... args)
InstancemethodName - The static method nameargs - The arguments to use for invoking the static methodInstance instance containing the result of the invocationvoid invokeAsync(long functionPointerAddress,
String methodName,
InvocationArg... args)
Instance.
The result of the invocation should be provided later using the performCallback method of a NativeCallbackSupport class.
Any possible returned objects from the actual synchronous invocation of the defined method will be dropped.functionPointerAddress - The address of the function pointer that will be used later in the native side in order to actually paerform the callback.methodName - The method nameargs - The arguments to use when invoking the callback method (the functionPointer)void invokeToChannel(long channelAddress,
String methodName,
InvocationArg... args)
Instance.
The result of the invocation should be provided later using the doCallback method of a NativeCallbackToRustChannelSupport class.
Any possible returned objects from the actual synchronous invocation of the defined method will be dropped.channelAddress - The memory address of the channelmethodName - The method nameargs - The argumentsvoid initializeCallbackChannel(long channelAddress)
Instance.
The channel can be used by Java to send values to Rust using the doCallback method of a NativeCallbackToRustChannelSupport class.channelAddress - The memory address of the channelInstance field(String fieldName)
fieldName - The name of the field to retrieveInstance instance containing the defined field.static <T> Instance cast(Instance from, String toClass)
Copyright © 2020. All rights reserved.