java - 为什么 Oracle JDK Javadoc 不包含严格浮点修饰符?

标签 java javadoc strictfp

如果我查看 NetBeans Javadoc 窗口中的 StrictMath.toRadians(),则会看到顶部两行

java.​lang.​StrictMath
public static strictfp double toRadians(double angdeg)

这是有道理的,因为我使用的 JDK 已使用 strictfp 修饰符定义了 StrictMath.toRadians()。但是,如果我看 the StrictMath Javadoc online ,我没有看到任何提及 strictfp 的内容。例如,toRadians() Javadoc 的顶行内容为

public static double toRadians(double angdeg)

我使用的是JDK 1.8.0_241,运行时稍微领先。相当肯定它是 Oracle JDK。据我所知,StrictMath 的 JDK 源代码中的 Javadoc 注释与上面链接的 Oracle 页面中发布的内容相匹配。

Javadoc 工具是否忽略了 strictfp 修饰符,或者 Oracle 故意将其从生成的 StrictMath Javadoc HTML 页面中取出?

(我尝试为虚拟 strictfp 函数生成 Javadoc,但在我尝试执行此操作的项目中似乎出现了一大堆看似不相关的 Javadoc 错误)。

最佳答案

作为documentation Java 8 的 javadoc 说:

The javadoc command can include the modifiers public, protected, private, abstract, final, static, transient, and volatile, but not synchronized or native. The synchronized and native modifiers are considered implementation detail and not part of the API specification.

它没有明确列出 strictfp,但由于 strictfp 是影响方法实现的功能,而不是影响方法的使用方式,因此将其排除在外原因。

关于java - 为什么 Oracle JDK Javadoc 不包含严格浮点修饰符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64399055/

相关文章:

javadoc - 类 Scaladoc 改进的 javadoc 格式?

java - 对象化 GAE/J Google App Engine : Understanding asynchronous load

java - 调用 HttpGet 类的 execute() 方法时出现 IO 异常

java - 如何在不覆盖方法本身的情况下覆盖方法的 javadoc?

java - 无 strictfp 的最小精度单位

java - 声明一个 Java 类 strictfp 是否意味着它在其他类中调用的方法也是 strictfp?

java - Java 的 strictfp 修饰符是否通过函数调用应用?

java - NativeQuery 的 Spring JPA 长 SQL 字符串

java - Apache POI 在 xls 文档打开后设置选定的单元格

java - 在 Antlr 3 中生成自定义 JavaDoc