-
Notifications
You must be signed in to change notification settings - Fork 82
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
No access to Java accessors during script evaluation #140
Comments
Thanks for the feedback! |
fantastic! Love the project by the way :) very easy to code against |
akbertram
added a commit
that referenced
this issue
Jan 21, 2016
…r explicit getters/setters For example, if you have: class MyBean { public int getAge() {} } Then both x <- MyBean$new() x$age and x$getAge() will evaluate correctly.
akbertram
added a commit
to akbertram/scripting-renjin
that referenced
this issue
Feb 6, 2016
In the latest version of Renjin you can use either the getter method or the property name. bedatadriven/renjin#140
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The automatic Java Bean conveniences actually make scripting in renjin unintuitive at first (for a Java developer), and even make some operations impossible (as far as I can tell).
For example, running the script:
Causes:
org.renjin.eval.EvalException: Instance of class java.util.HashMap has no member named 'getClass'
Which would be manageable, except if I try to avoid using the accessor:
I still get an
EvalException
, for "no member named class".In other cases the automatic Bean parsing worked great. But given this, it seems like Renjin is over-aggressive in stripping away accessors.
Also, I suggest preserving both accessor and direct field members to the External_Ptrs - so code from Java will work regardless of which it was written to use.
The text was updated successfully, but these errors were encountered: