JavaFX 和 JEP 253:'skin' API 在 Java9 发布后是否仍然可用?
JavaFX & JEP 253: Will 'skin' API remain available after Java9 release?
我的理解是 com.sun.* API 当前受限但仍用于 JavaFX 控件,当 Java9 发布时将不再可用;但是,“皮肤”API 将变为 public 或可访问,因此此更改将有效地仅适用于“行为”API。这个观点是基于我对 JEP 253 的最新更新的阅读(两周前,相对较新)。对于那些比我有更多 JavaFX 及其演变过程经验的人(这并不需要太多),假设当前的“皮肤”API 将保持可访问(并变得不受限制)是否安全?我不期望任何保证,但如果这是一个不确定的命题,那么对可能发生的事情的最佳猜测估计将不胜感激。
提前感谢您的回复!
如 JEP 253 所述:
With the forthcoming release of Java 9, and in particular with the introduction of strong boundaries between modules in Project Jigsaw, developers will find that their code will no longer compile or run since the com.sun.* packages will no longer be accessible.
为了向在 com.sun.javafx.scene.control.skin
中子类化皮肤 类 的开发人员提供一些支持,这些 类 将被移动到 public 包 javafx.scene.control.skin
在 JavaFX 9 中。JEP 毫不避讳地表示,这是为了支持那些一开始就忽略了有关使用这些 类 的官方建议的开发人员。
JEP 还指出
The intention is to move many JavaFX control skins into the appropriate public package, most probably javafx.scene.control.skin
. There is no intent to also move the related behavior classes.
这意味着行为 类 将保留在非 public API 中,因此在 Java 中将无法访问 9. 皮肤 类将移动到不同的包,因此依赖于当前 com.sun.javafx.scene.control.skin
包的代码将无法编译或 运行 在 Java 9 中,但可以修改为这样做。依赖于 类 行为的代码将无法编译或 运行,并且无法进行修改。
JEP 列出了 类 已被移动的内容。此外,可以看到 JavaFX 9 的当前抢先体验 API 文档,皮肤 类 已移至 javafx.scene.control.skin
here。
我的理解是 com.sun.* API 当前受限但仍用于 JavaFX 控件,当 Java9 发布时将不再可用;但是,“皮肤”API 将变为 public 或可访问,因此此更改将有效地仅适用于“行为”API。这个观点是基于我对 JEP 253 的最新更新的阅读(两周前,相对较新)。对于那些比我有更多 JavaFX 及其演变过程经验的人(这并不需要太多),假设当前的“皮肤”API 将保持可访问(并变得不受限制)是否安全?我不期望任何保证,但如果这是一个不确定的命题,那么对可能发生的事情的最佳猜测估计将不胜感激。
提前感谢您的回复!
如 JEP 253 所述:
With the forthcoming release of Java 9, and in particular with the introduction of strong boundaries between modules in Project Jigsaw, developers will find that their code will no longer compile or run since the com.sun.* packages will no longer be accessible.
为了向在 com.sun.javafx.scene.control.skin
中子类化皮肤 类 的开发人员提供一些支持,这些 类 将被移动到 public 包 javafx.scene.control.skin
在 JavaFX 9 中。JEP 毫不避讳地表示,这是为了支持那些一开始就忽略了有关使用这些 类 的官方建议的开发人员。
JEP 还指出
The intention is to move many JavaFX control skins into the appropriate public package, most probably
javafx.scene.control.skin
. There is no intent to also move the related behavior classes.
这意味着行为 类 将保留在非 public API 中,因此在 Java 中将无法访问 9. 皮肤 类将移动到不同的包,因此依赖于当前 com.sun.javafx.scene.control.skin
包的代码将无法编译或 运行 在 Java 9 中,但可以修改为这样做。依赖于 类 行为的代码将无法编译或 运行,并且无法进行修改。
JEP 列出了 类 已被移动的内容。此外,可以看到 JavaFX 9 的当前抢先体验 API 文档,皮肤 类 已移至 javafx.scene.control.skin
here。