I just received a third party authentication library to use in my clients application. I didn’t receive any documentation with it and am trying to dig through the source and see how it works. I’m very to new Java when i click Go To -> Declaration on methods in IntelliJ it sends me to a .class
file and i see a bunch of stubbed methods with /* compiled code */
in the methods.
I’m fairly sure this is common in Java i just don’t know what to search for to learn about what exactly is going on. Any clarification would be great.
Advertisement
Answer
This typically meant that you don’t have the source code, and IntelliJ IDEA would just display /* compiled code */
as a placeholder for the source code you don’t have. I believe this has now changed, and IntelliJ comes bundled with a full Java decompiler plugin, and will display the decompiled source code as standard.
To better see what’s going on, the best would be to receive the actual source code of the third party library.
You should of course also get the documentation, as reading the source code and guessing how to use a library usually isn’t the best way to learn.
The second best option would be use the decompiler plugin in IntelliJ, that will automatically decompile the Java class file (note that the license for your third party library may disallow you to do just that). This will never be a 100% solution, but in most cases it’s better than nothing.