在包级别Netbeans中创建Javadoc [英] Create javadoc at the package level Netbeans
问题描述
好.关于如何执行此操作似乎有很多信息,但是我没有在Javadoc中获得有关软件包说明的信息.另外,对于如何执行此操作的确切过程,我有些(或很多)感到困惑.
OK. There appears to be lots of information out there on how to do this but I'm not getting the information in my javadoc for the package description. Plus, I'm a little (or a lot) confused about the exact procedure on how to do this.
我已经创建了此答案中指定的package-info.java类.
I've created a package-info.java class as specified in this answer.
/*
* Package description that I want to get added to my javadoc
*/
package com.pdl.myapp;
但是当我运行生成javadocs时,javadocs中的软件包说明中什么都没有出现.
But when I run generate javadocs nothing appears in the description for the package in the javadocs.
然后,我尝试使用此答案中所述的包级注释,但对于要替换的内容非常困惑// stuff as required.
Then I tried using package level annotations as described in this answer but got very confused about exactly what to put to replace the // stuff as required.
这是我的package-info.java类.请注意,已添加 @PackageLevelAnnotation 注释.
Here is my package-info.java class. Notice the @PackageLevelAnnotation annotation has been added.
/*
* Package description that I want to get added to my javadoc
*/
@PackageLevelAnnotation
package com.pdl.myapp;
这是我的
package com.pdl.myapp;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
*
* @author Miss Lucy
*/
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.PACKAGE)
public @interface PackageLevelAnnotation {
// stuff as required <----- WHAT IS THIS?
// How do I add my package description?
// Package description that I want to get added to my javadoc
}
叫我哑巴,但我只是不明白.有人可以给我提供具体信息或为我指向傻瓜主题吗?
Call me dumb but I am just not getting it. Can someone give me specific information or point me to this topic for Dummies?
推荐答案
您似乎使用了错误的注释样式.
It looks like you are using the wrong comment style.
/* <--- note one asterisk.
* You are using this, this does not generate java docs.
*/
在package-info.java文件中,在软件包上方包含一个Java doc注释. 例如:
In your package-info.java file include a java doc comment above the package. For example:
/** <--- note two asterisks.
* This is my package description
*/
package com.blam.kapow;
这篇关于在包级别Netbeans中创建Javadoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!