gpt4 book ai didi

java - 从 javadoc 中排除方法

转载 作者:搜寻专家 更新时间:2023-10-31 20:11:04 27 4
gpt4 key购买 nike

我们使用 javadoc 生成 JUnit 测试的测试文档报告。到目前为止有效。但是我们想排除像 @BeforeClass @AfterClass @Before @After 这样的方法,但是它们必须是公开的。

我找到了 similar question在计算器中。我不想将方法标记为已弃用。

最佳答案

我们不能对公共(public)方法执行此操作。

此外,可能会添加一个标签,@exclude tag

来自文档。

@排除

For API to be excluded from generation by Javadoc. Programmer would mark a class, interface, constructor, method or field with @exclude. Presence of tag would cause API to be excluded from the generated documentation. Text following tag could explain reason for exclusion, but would be ignored by Javadoc. (Formerly proposed as @hide, but the term "hide" is more appropriate for run-time dynamic show/hide capability.) For more discussion, see: Feature Request #4058216 in Developer Connection.

你可能会得到一些替代品 here .

关于java - 从 javadoc 中排除方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28083187/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com