public class InvocationArg extends Object implements Instance
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENTS_ARRAY
The array contents should map to a List.
|
| Constructor and Description |
|---|
InvocationArg(Instance instance) |
InvocationArg(String className,
Instance instance) |
InvocationArg(String className,
Object object) |
InvocationArg(String className,
String json) |
| Modifier and Type | Method and Description |
|---|---|
Instance |
field(String fieldName)
Retrieves the instance held under the Field fieldName
|
String |
getClassName()
The type of this argument.
|
Instance |
getInstance() |
String |
getJson() |
Object |
getObject() |
Class<?> |
getObjectClass() |
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. |
boolean |
isSerialized()
If true, the argument is taken straight by the Java code as Object.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcast, cloneInstancepublic static final String CONTENTS_ARRAY
public InvocationArg(Instance instance)
public InvocationArg(String className, Object object) throws ClassNotFoundException
ClassNotFoundExceptionpublic boolean isSerialized()
public String getClassName()
public Instance getInstance()
public Object getObject()
getObject in interface ObjectValuepublic Class<?> getObjectClass()
getObjectClass in interface ObjectValuepublic Instance invoke(String methodName, InvocationArg... args)
InstanceInstancepublic Instance invokeStatic(String methodName, InvocationArg... args)
InstanceInstanceinvokeStatic in interface InstancemethodName - The static method nameargs - The arguments to use for invoking the static methodInstance instance containing the result of the invocationpublic void invokeAsync(long functionPointerAddress,
String methodName,
InvocationArg... args)
InstanceInstance.
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.invokeAsync in interface InstancefunctionPointerAddress - 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)public void invokeToChannel(long channelAddress,
String methodName,
InvocationArg... args)
InstanceInstance.
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.invokeToChannel in interface InstancechannelAddress - The memory address of the channelmethodName - The method nameargs - The argumentspublic void initializeCallbackChannel(long channelAddress)
InstanceInstance.
The channel can be used by Java to send values to Rust using the doCallback method of a NativeCallbackToRustChannelSupport class.initializeCallbackChannel in interface InstancechannelAddress - The memory address of the channelCopyright © 2020. All rights reserved.