Loading fields from unloaded classes? #790
Unanswered
lostkagamine
asked this question in
Q&A
Replies: 1 comment
-
ClassGraph never loads classes, ever, unless that is requested (the So if I don't know the reason for this, but you can call |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to know the best way to load fields from classes that are not loaded at scan-time. I'm running into the problem of needing to scan the entire classpath, and would like to discover annotated fields in my own classes. I'm running inside
fabric-loader
(the Minecraft modding platform).Here's the code that does the scanning:
My problem is that
it.fieldInfo
(and hencedeclaredFieldInfo
) isnull
in the IntelliJ IDEA debugger, causing it to be an empty array, so something is clearly not loading.The field
should end up within
keys
as{ some.key: <theField> }
.Beta Was this translation helpful? Give feedback.
All reactions