Module /fusion/ffi/java
Foreign Function Interfaces for integrating Fusion with Java.
At present, these interfaces are incomplete and insufficient for real-world
use cases. While java_new allows you to create Java objects and treat them
as Fusion values, you can't do anything with such values, since the built-in
operators only support concrete types that are not yet public.
See issue #63.
Exported Bindings
(java_class name)
Return the java.lang.Class instance for the given fully-qualified class name.
Equivalent to the Java code Class.forName(name).
(java_instance_of value class)
Determines whether a value is an instance of the given Java class,
returning true or false.
The class must be an instance of java.lang.Class, not a string.
For example, the following is always true because all values in the Fusion runtime
are implemented by Java objects:
(java_instance_of anything (java_class "java.lang.Object"))
(java_new classname arg ...)
Instantiates a new Fusion value that's implemented by a Java class. classname
is the fully-qualified Java class name. A constructor with the appropriate
number of Object arguments will be invoked and the result returned.