多行代码的java Javadoc格式问题
我有以下Javadoc,它有多行代码:
* <p>Usage example:
* <code>
* ConfigurationProperty property = ConfigurationProperty.Builder
* .create()
* .withHotKey("testKey")
* .withRunnableContext("testContext")
* .withRunnableContextType("APPLICATION")
* .build();
* </code>
*
* The {@link ConfigurationProperty.Builder#withRunnableContextType(String type) method
* throws an {@link IllegalArgumentException} if the provided type is not supported in
* {@link ConfigurationProperty#RUNNABLE_CONTEXT_TYPE}
我的问题是,代码在生成的Javadoc中没有以正确的缩进显示。以下是我在生成的Javadoc中看到的内容,没有任何缩进:
Immutable implementation of a ConfigurationProperty. This class is
immutable, and so is thread safe. An instance of the ConfigurationProperty
can be obtained by using the ConfigurationProperty.Builder
Usage example: ConfigurationProperty property =
ConfigurationProperty.Builder .create() .withHotKey("testKey")
.withRunnableContext("testContext") .withRunnableContextType("APPLICATION")
.build(); } The method throws an IllegalArgumentException if the provided
type is not supported in ConfigurationProperty.RUNNABLE_CONTEXT_TYPE
如果我用pre标记替换代码,那么只会显示第一行代码。 为什么会这样。我该怎么解决这个问题? 有没有关于如何纠正这个问题的想法
请告知
谢谢
共 (0) 个答案