-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending Java classes from JavaScript code #32
Comments
Hi madoar, thanks for your question. As of RC5 (published early August), The syntax extension around Best, |
Thank you for the information! This leads me to another question. In my eyes, it would be ideal if it's possible to extend a Java class class ConcreteClass extends AbstractClass {
...
} or class ConcreteClass extends Java.type("AbstractClass") {
...
} |
@madoar I like the idea of using the class syntax, but I have some reservations about mixing JS and Java class semantics. It raises some questions about how class evaluation has to be changed to support this, and you'll only really know at runtime if you're extending a Java class. We'll consider it in the future, but for the time being we'll only support the "Nashorn way" (that comes from a time when JS didn't have classes yet). |
I'm interested to learn how to extend Java classes/interfaces with graal.js.
I know of the "nashorn way" to extend Java classes/interfaces, which is using either the
new
operator or to useJava.extend
, but I'm not sure how this can be achieved in graal.js without the nashorn compatibility mode?The text was updated successfully, but these errors were encountered: