Javadoc 多行声明语法?

标签 java file path javadoc

如果我有变量声明:

/**
 * The Resource folder for the program Information.
 */
public static final Path RESOURCE_FOLDER_PATH = Paths.get("", "Resources"),
/**
 * The folder holding all faction information.
 */
FACTION_FOLDER_PATH = Paths.get(RESOURCE_FOLDER_PATH.toString(), "Faction Information");

Javadoc 不会记录后一个 Path 变量。 Javadoc 是否支持这种类型的文档风格还是我必须单独声明它们?

最佳答案

不,不幸的是你不能。

您需要按照以下更清晰、更整洁的方式进行操作:

/**
 * Returns an Image object that can then be painted on the screen. 
 * The url argument must specify an absolute {@link URL}. The name
 * argument is a specifier that is relative to the url argument. 
 * <p>
 * This method always returns immediately, whether or not the 
 * image exists. When this applet attempts to draw the image on
 * the screen, the data will be loaded. The graphics primitives 
 * that draw the image will incrementally paint on the screen. 
 *
 * @param  url  an absolute URL giving the base location of the image
 * @param  name the location of the image, relative to the url argument
 * @return      the image at the specified URL
 * @see         Image
 */
 public Image getImage(URL url, String name) {
        try {
            return getImage(new URL(url, name));
        } catch (MalformedURLException e) {
            return null;
        }
 }

关于Javadoc 多行声明语法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23766470/

相关文章:

java - GAE 应用程序在 tomcat 上给出错误 500;运行 javac.exe 编译器时出错

c# - 访问路径 C :\is denied

java - Swing UIManager.getColor() 键

java - swing Drop 事件多个文件

java - 配置扫描本地文件系统的 TreeView 以仅包含具有文件类型的文件夹

file - 在 SharePoint 中自动附加或预先添加使用日期或随机数上传的文件的名称

java - 为什么 servletContext.getRealPath 在 tomcat 8 上返回 null?

java - Eclipse(或任何 IDE)能否将类型参数引入现有类型

java 递归插入排序

java - 如果字符索引已知,是否可以在恒定时间内替换文本文件中的字符?