GWT中的Java 8支持 [英] Java 8 support in GWT

查看:125
本文介绍了GWT中的Java 8支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个非常基本的问题,但我搜索了高低,几乎没有发现任何地方。所以,我会在这里问一下。



当前在GWT中支持Java 8新语言结构的计划是什么?



另外,拟议的Java 8库的哪个子集将用于客户端仿真? Stream API?新的日期/时间API?



最后,关于这个重要主题的讨论在哪里进行?我确信有很多人愿意参与这项工作,并可能为此付出努力。

Java 8测试版已经出现一段时间了,并且有许多文章讨论了提议的API。它应该在今年晚些时候有关系,所以似乎过去至少在讨论如何以及何时将期望的语言特征引入GWT。

如果在其他地方回答了这个问题,或者我错过了与此相关的一些重要信息,我很抱歉。即使已得到回答,这也是获得此类信息链接的好地方。谢谢!

解决方案

更新答案的时间。

更新(2017年10月) GWT 2.8.2 在此处可用发行说明



更新(2017年6月)

官方 GWT 2.8.1 download 地点。

2.8.1发行注记



UPDATE(10月2016)



GWT 2.8.0终于来了!



GWT团队在 Github 上发布了2.8.0标记。官方的GWT网站尚未更新,但在GWT网站上的更改请求是准备好并在审核过程中编译版本很快就可以下载!



可供下载


$ b

UPDATE(2016年9月)同时,团队GWT已经标记了 rel =nofollow noreferrer> GWT 2.8.0 RC3 在GitHub镜像上。

GWT团队(Daniel Kurka)发布了GWT 2.8.0(RC2)版本 here b
$ b

发行说明适用于2.8.0 RC2):

错误修正



  • 解决DevMode服务器(jetty)重新启动的问题。

  • 修复超级开发模式下的一个问题,编译器选项不会触发完整的重新编译。
  • 在DevMode入口点添加了缺少的命令行参数
  • 修复了字符串中的性能回归。



RC1的发行说明可在官方网站。以下是即将发布的GWT 2.8.0中对Java 8支持的最重要变化:
$ b

亮点




  • 部分支持Java 8标准库API(请参阅下面的完整列表)。

  • 修复Java 8编译中的内存泄漏。 li>
  • 源级别设置为Java 8。

  • 接口中的静态方法和默认方法对于生成器不可见。如果您想要利用这些Java-8isms,建议您切换到注释处理器。如果更改了接口以将非默认方法转换为默认方法,则这可能会破坏现有的构建。



JDK 8仿真支持


  • 仿真java.io.UncheckedIOException。

  • 仿真可选及其
  • 用消息Supplier模拟Objects.requireNonNull()。
  • 修复Math.min / max(float / double)仿真行为。
  • 模拟Character.isBmpCodePoint()。

  • 仿真CharSequence.chars()。

  • 模拟java.lang.SecurityException。

  • 模拟


    • 的Java 8 API java.util.Arrays,

    • java.util.ArrayDeque

    • java.math.BigInteger,
    • java.util.BitSet, li>
    • java.util.Comparator,

    • java.util.function,

    • java.util.Iterator,

    • java.lang.Iterable,

    • java.util.IntSummaryStatistics / LongSummaryStatistics / DoubleSummarySt atistics

    • java.util.Collection / Lists / Queues,
    • java.util.Map,

    • java.util.logging.Logger

    • java.util.PrimitiveIterator

    • java.util.Spliterator

    • java.util.stream

    • java.util.StringJoiner




GWT 2.8.0 RC2仍然存在一些问题,GWT团队很快就会解决这个问题。最终版本即将推出(一旦准备就绪)。

This seems like a very basic question, but I searched high and low and have found almost no mention of it anywhere. So, I'll ask it here here.

What is the current plan for supporting Java 8's new language constructs in GWT?

In addition, what subset of the proposed Java 8 libraries are slated for client-side emulation? The Stream API? The new Date/Time API?

And finally, where are the discussions relating this important topic taking place? I'm sure there are many of us who would like to participate in, and potentially contribute to, the effort.

The Java 8 betas have been around for a while now, and there are numerous articles discussing the proposed APIs. It is supposed to be related later this year, so it seems past time to at least be discussing how and when the much-desired language features will make their way into GWT.

My apologies if this question is answered somewhere else, or if I missed some important piece of information related to it. This would be a great place to have a link to such information, even if it has been answered. Thanks!

解决方案

Time to update the answer.

UPDATE (October 2017)

GWT 2.8.2 available here. Release notes.

UPDATE (June 2017)

Official GWT 2.8.1 download location.

Release Notes for 2.8.1

UPDATE (October 2016)

GWT 2.8.0 is finally here!

The GWT team has released the 2.8.0 tag on Github. The official GWT website has not been updated yet, but a pull request for the changes on GWT's website is ready and in review process. So very very soon the compiled version will be available for download!

Available for download

UPDATE (September 2016)

Meanwhile, team GWT has tagged GWT 2.8.0 RC3 on GitHub mirror.

The GWT team (Daniel Kurka) has released the GWT 2.8.0 (RC2) version here.

The release notes are available for 2.8.0 (RC2):

Bug fixes

  • Fix incorrect unusable-by-js warning.
  • Fix an issue around DevMode server (jetty) restart.
  • Fix an issue in super dev mode with changing compiler options not triggering full recompiles.
  • Added missing command line parameters to DevMode entry point
  • Fixed a performance regression in String.

The release notes from RC1 are available on official website. Here are the most important changes regarding Java 8 support in the upcoming GWT 2.8.0:

Highlights

  • Partial support for Java 8 standard library APIs (see below for full list).
  • Fix memory leak with Java 8 compilation.
  • Source level set to Java 8.
  • Static and default methods in interfaces aren’t visible to generators. If you want to take advantage of those Java-8isms, you’re encouraged to switch to an annotation processor. This could break existing build if an interface is changed to turn a non-default method into a default method.

JDK 8 emulation support

  • Emulate java.io.UncheckedIOException.
  • Emulate Optional and its int, long, double variants.
  • Emulate Objects.requireNonNull() with message Supplier.
  • Fix Math.min/max(float/double) emulation behavior.
  • Emulate Character.isBmpCodePoint().
  • Emulate CharSequence.chars().
  • Emulate java.lang.SecurityException.
  • Emulate Java 8 API of
    • java.util.Arrays,
    • java.util.ArrayDeque,
    • java.math.BigInteger,
    • java.util.BitSet,
    • java.util.Comparator,
    • java.util.function,
    • java.util.Iterator,
    • java.lang.Iterable,
    • java.util.IntSummaryStatistics/LongSummaryStatistics/DoubleSummaryStatistics
    • java.util.Collection/Lists/Queues,
    • java.util.Map,
    • java.util.logging.Logger,
    • java.util.PrimitiveIterator,
    • java.util.Spliterator,
    • java.util.stream,
    • java.util.StringJoiner

The GWT 2.8.0 RC2 still has some issues, which the GWT team is expected to fix soon. The final release should be coming out soon ("as soon as it is ready").

这篇关于GWT中的Java 8支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆