Extra field in classes when compiling with IntelliJ
Hi all,
I'm compiling with IntelliJ, and I want to use some reflection to see all the public fields in the class. I use the following code to do so:
When I compile this with javac, I get this output:
Field name
Field address
When I compile this with IntelliJ (jdk 1.4), I get this output:
Field name
Field address
Field class$nl$wehkamp$trc$fitnesse$Test
Now my question is: when does this extra field come from? I already unchecked the 'Generate debuggin info' in the javac options, but maybe I missed something here?
Erik
Please sign in to leave a comment.
Hello Erik,
This is a field for the class literal. It's added by javac, not IntelliJ
IDEA. Handling of class literals changed between different versions of javac,
so you simply see the result of a javac version difference.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Oops, my mistake then! Thanks for the quick reply!
See here:
http://weblog.ikvm.net/CommentView.aspx?guid=be215eac-9929-4da3-8d20-ff009c39675e