KubeJS-Mods / KubeJS

https://kubejs.com
GNU Lesser General Public License v3.0
307 stars 90 forks source link

support for protected and private method and fields in java #827

Closed gjmhmm8 closed 5 months ago

gjmhmm8 commented 5 months ago

Describe the feature

support for protected and private method and fields in java

Additional info

No response

pietro-lopes commented 5 months ago

You are free to use reflection if you need

gjmhmm8 commented 5 months ago

Why not make it the default option? Secondary reflection can lead to reduced efficiency.

pietro-lopes commented 5 months ago

you would be surprised with the amount of reflection Rhino does...

gjmhmm8 commented 5 months ago

you would be surprised with the amount of reflection Rhino does...

pietro-lopes commented 5 months ago

everything you write on scripts and make a call gets through this reflection stuff

https://github.com/KubeJS-Mods/Rhino/blob/bc5f50bf9e3f5279502d81ea93c45718c3694c24/common/src/main/java/dev/latvian/mods/rhino/MemberBox.java#L149