【发布时间】:2015-02-19 23:17:11
【问题描述】:
我有一个 javadoc 代码块,我想在其中编写一个包含这样的泛型的代码示例:
public interface SomeInterface <T> { }
public interface SomeInterface extends SomeOtherInterface<T> { }
这是我的 javadoc 块:
/**
* Get the Generic Type T of a Type (Class/Interface) or extended/inherited Subtype:
* <pre>
* {@code
* public interface SomeInterface <T> { }
* public interface SomeInterface extends SomeOtherInterface<T> { }
* }
* </pre>
* @param implType
* @param parentType
* @return
*/
public static JClassType findGenericType(JClassType implType, JClassType parentType) { ... }
javadoc 输出为:
Get the Generic Type T of a Type (Class/Interface) or extended/inherited Subtype:
public interface SomeInterface { }
public interface SomeInterface extends SomeOtherInterface { }
}
Parameters:
implType
parentType
Returns:
输出中缺少泛型。
如何让 javadoc 正确显示泛型?
【问题讨论】: