Hi everyone, I'm using a Java library in XQuery in BaseX and I haven't been able to determine if there's a way to access a constant string (final static String... or even just final String...) in the Java class from XQuery.
For example, if the Java class is declared as
package my.module;
public class MyModule {
public static final String TITLE ="I'm a module!";
public String hello(final String world) {
return "Hello " + world;
}
}
The XQuery to call the "hello" method is
import module namespace java = 'java:my.module.MyModule';
java:hello("World!")
But is there any way to access "TITLE"?
I'd like to share some constants between XQuery and Java, and I could write accessor functions for these constants, but it'd be cleaner if I didn't have to.
Thanks!