你的javadoc是否被编译到你的类文件中? [英] Do your javadocs get compiled into your class files?
问题描述
当您编译 java
文件时,是否也将您的javadoc和注释嵌入类文件?
例如,如果你有大的javadoc,它是否影响类文件的整体大小?还是编译器忽略以 //
和 / *
?
如果你这样做,那么源的大小很重要。
从运行时的角度来看,差别并不重要。
When you compile your java
files, does it also embed your javadocs and comments into the class file?
For example, if you have large javadocs, does it effect the overall size of your class file? Or does the compiler ignore everything beginning with //
and /*
?
You can tell the compiler to include the sources in the class file (javac -g:source
). That means every bit of the source will be added. Comments, code, whitespace, everything.
If you do that, then the size of the source matters. Otherwise, it doesn't.
From a runtime perspective, the difference doesn't matter much.
这篇关于你的javadoc是否被编译到你的类文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!