#How to apply access widener to java.lang.Class

6 messages · Page 1 of 1 (latest)

pure vine
#

I have this access widener

accessible  method  java/lang/Class privateGetDeclaredMethods (B)[Ljava/lang/reflect/Method;

but it's throwing this error when generating sources

Cause: java.lang.RuntimeException: Could not find method (privateGetDeclaredMethods(B)[Ljava/lang/reflect/Method;) in class (java/lang/Class)

trying

accessible    class    java/lang/Class

throws this error

Cause: java.lang.RuntimeException: Could not find class (java/lang/Class)

Do access wideners not work on runtime code?

rustic quest
#

..why?

pure vine
#

im violating java

rustic quest
#

why are you trying to use privateGetDeclaredMethods

knotty pivot
#

My guess is it'll not work since that's something that needs to be loaded so soon. Then again, idk how AWs work. If you're doing something this cursed, might as well use reflection.

somber bear
#

AWs can only be used on Minecraft classes