graalpython
graalpython copied to clipboard
Exporting a method with a different name than its declaration
Let's say I have a Java class:
class Foo {
public void bar() {
System.out.println("bar");
}
}
I want to access that bar
method in python but with a different name. I swear a while ago I could do:
@HostAccess.Export(name = "barMethod")
public void bar() {
System.out.println("bar");
}
But now the name
field doesn't exist?
So then in Python it would be called with barMethod
instead of bar
.