Class JavaFxInvocation<T>
- java.lang.Object
-
- org.astonbitecode.j4rs.api.invocation.JavaFxInvocation<T>
-
- All Implemented Interfaces:
Instance<T>,JsonValue,ObjectValue
public class JavaFxInvocation<T> extends Object implements Instance<T>
-
-
Constructor Summary
Constructors Constructor Description JavaFxInvocation(JsonInvocationImpl<T> jsonInvocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instance<?>field(String fieldName)Retrieves the instance held under the Field fieldNameStringgetJson()ObjectgetObject()Class<?>getObjectClass()StringgetObjectClassName()voidinitializeCallbackChannel(long channelAddress)Initialize a callback channel for thisInstance.Instanceinvoke(String methodName, InvocationArg... args)Invokes a method of the instance of the class that is set for thisInstancevoidinvokeAsync(long functionPointerAddress, String methodName, InvocationArg... args)Invokes asynchronously a method of the instance of the class that is set for thisInstance.InstanceinvokeStatic(String methodName, InvocationArg... args)Invokes a static method of the class that is set for thisInstancevoidinvokeToChannel(long channelAddress, String methodName, InvocationArg... args)Invokes a method of the instance of the class that is set for thisInstance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.astonbitecode.j4rs.api.Instance
getOrDeserializeJavaObject
-
-
-
-
Constructor Detail
-
JavaFxInvocation
public JavaFxInvocation(JsonInvocationImpl<T> jsonInvocation)
-
-
Method Detail
-
invoke
public Instance invoke(String methodName, InvocationArg... args)
Description copied from interface:InstanceInvokes a method of the instance of the class that is set for thisInstance
-
invokeStatic
public Instance invokeStatic(String methodName, InvocationArg... args)
Description copied from interface:InstanceInvokes a static method of the class that is set for thisInstance- Specified by:
invokeStaticin interfaceInstance<T>- Parameters:
methodName- The static method nameargs- The arguments to use for invoking the static method- Returns:
- A
Instanceinstance containing the result of the invocation
-
invokeAsync
public void invokeAsync(long functionPointerAddress, String methodName, InvocationArg... args)Description copied from interface:InstanceInvokes asynchronously a method of the instance of the class that is set for thisInstance. The result of the invocation should be provided later using the performCallback method of aNativeCallbackSupportclass. Any possible returned objects from the actual synchronous invocation of the defined method will be dropped.- Specified by:
invokeAsyncin interfaceInstance<T>- Parameters:
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)
-
invokeToChannel
public void invokeToChannel(long channelAddress, String methodName, InvocationArg... args)Description copied from interface:InstanceInvokes a method of the instance of the class that is set for thisInstance. The result of the invocation should be provided later using the doCallback method of aNativeCallbackToRustChannelSupportclass. Any possible returned objects from the actual synchronous invocation of the defined method will be dropped.- Specified by:
invokeToChannelin interfaceInstance<T>- Parameters:
channelAddress- The memory address of the channelmethodName- The method nameargs- The arguments
-
initializeCallbackChannel
public void initializeCallbackChannel(long channelAddress)
Description copied from interface:InstanceInitialize a callback channel for thisInstance. The channel can be used by Java to send values to Rust using the doCallback method of aNativeCallbackToRustChannelSupportclass.- Specified by:
initializeCallbackChannelin interfaceInstance<T>- Parameters:
channelAddress- The memory address of the channel
-
field
public Instance<?> field(String fieldName)
Description copied from interface:InstanceRetrieves the instance held under the Field fieldName
-
getObject
public Object getObject()
- Specified by:
getObjectin interfaceObjectValue
-
getObjectClass
public Class<?> getObjectClass()
- Specified by:
getObjectClassin interfaceObjectValue
-
getObjectClassName
public String getObjectClassName()
- Specified by:
getObjectClassNamein interfaceObjectValue
-
-