具有/*编译代码*/的Java类方法存根 [英] java class method stubs with /* compiled code */

查看:80
本文介绍了具有/*编译代码*/的Java类方法存根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚收到第三方身份验证库,可用于我的客户应用程序.我没有收到任何文档,而是试图深入研究源代码并查看其工作原理.当我在IntelliJ中的方法上单击转到-> 声明时,我非常喜欢新Java,它会将我发送到.class文件,并且我看到许多桩方法在方法中使用/* compiled code */.

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.

我相当确定这在Java中很常见,只是我不知道要搜索什么才能了解​​到底发生了什么.任何澄清都很好.

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.

推荐答案

这通常意味着您没有源代码,而IntelliJ仅将/* compiled code */显示为您没有源代码的占位符.

This typically means you don't have the source code, and IntelliJ just displays /* compiled code */ as a placeholder for the source code you don't have.

要真正了解正在发生的事情,最好的方法是接收第三方库的源代码.

To actually see what's going on, the best would be to receive the source code of the third party library.

您当然也应该获得文档,因为阅读源代码并猜测如何使用库通常不是学习的最佳方法.

第二个最佳选择是为IntelliJ安装一个反编译器插件,例如IntelliJAD,它将自动反编译Java类文件(请注意,第三方库的许可证可能不允许您这样做).这永远不会是100%的解决方案,但是在某些情况下,总比没有好.

The second best option would be to install a decompiler plugin for IntelliJ, like IntelliJAD, 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 some cases it's better than nothing.

这篇关于具有/*编译代码*/的Java类方法存根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆