mozilla / rhino

Rhino is an open-source implementation of JavaScript written entirely in Java
https://rhino.github.io
Other
4.15k stars 846 forks source link

Provide a way to control the visibility of methods and fields in scripts #1619

Closed 821938089 closed 3 weeks ago

821938089 commented 3 weeks ago

I want to hide some methods and fields from the script, but currently its visibility is controlled by a modifier, and once I use the private modifier this will cause my code to not be able to access this method as well.

ps: Using kotlin programming on android.

p-bakker commented 3 weeks ago

This is a very generic question where the potential answers vary significantly based on the situation at hand, ranging from using the (to be removed) SecurityManager to disabling Java interop to using annotations

Am converting this to a discussion (for now)

Please provide more info