如何保持的javadoc可见混淆后 [英] How to keep javadoc visible after obfuscating

查看:153
本文介绍了如何保持的javadoc可见混淆后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建了一个漂亮的Javadoc文档我的项目是开发者的 JAR文件

I built a nice Javadoc documentation for my project which is a JAR file for developers.

但我为了运行的ProGuard到obfuscat我的code毕竟Javadoc文档都没有了。

But after I run proguard in order to obfuscat my code all the Javadoc documentation are gone.

我想保持的javadoc在罐子里我所有的公共方法。 有谁知道如何进行模糊处理后仍保持明显的Javadoc?

I would like to keep javadoc on all my public methods in the jar. Does anyone know how keep Javadoc visible after obfuscating?

谢谢!

推荐答案

的Javadoc从中提取的源文件的。这是不可能从类文件的,既不干净也不模糊创建的javadoc。 ProGuard的操作上的类文件的从编译的源文件的创建,并从它产生的混淆类文件的。这是完全无关的javadoc的创作。

Javadoc is extracted from source files. It is not possible to create javadoc from class files, neither clean nor obfuscated. ProGuard operates on the class files created from compiling your source files, and produces obfuscated class files from it. This is completely unrelated to javadoc creation.

的Javadoc处理器的输出通常进入到目录结构中。当然,你可以压缩的,并给它的的.jar 扩展,提供javadoc的为好。我已经看到了它常常(比如,在Apache下议院)来命名库JAR一些 FOO吧-1.2.3.jar 和压缩的javadoc FOO吧-1.2.3-javadoc.jar

The output of the Javadoc processor usually goes to a directory structure. Of course, you can zip that and give it the .jar extension to provide the javadoc as well. I’ve seen it often (i.e, on Apache Commons) to name your library JAR some foo-bar-1.2.3.jar and the zipped javadoc foo-bar-1.2.3-javadoc.jar.

有一个好主意,以提供从二进制分离javadoc的,作为二进制需要被包括在一个依赖它节目分发,而javadoc的是唯一感兴趣的显影剂和只会增加的尺寸程序没有,如果它是在同一个JAR任何需要。

It is a good idea to provide the javadoc separated from the binary, as the binary needs to be included in a program distribution that relies on it, whereas the javadoc is only interesting for the developer and would only increase the size of the program without any need if it was in the same JAR.

在IDE中,你需要javadoc的JAR分配到库JAR。在Eclipse中,这可以从的属性 Java构建路径的对话完成。在已经添加了JAR文件,扩展你旁边创建的条目,选择的的Javadoc位置的,然后的编辑... 的白色箭头。 Eclipse的阅读理解的从存档的Javadoc 的直接,你不需要解压。

In the IDE, you need to assign the javadoc JAR to the library JAR. In Eclipse, this can be done from the PropertiesJava Build Path dialogue. After having added the JAR file, expand the white arrow next to the entry you created, select Javadoc location and then Edit…. Eclipse understands reading Javadoc from archive directly and you don’t need to unzip it.

这篇关于如何保持的javadoc可见混淆后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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