Groovy 1.7.4 和1.8.0-beta-1版本发布

鉴客
 鉴客
发布于 2010年07月26日
收藏 0

Groovy 1.7.4 和1.8.0-beta-1版本同时发布。

 

Groovy 1.7.4

此版本主要是对bug的修复,还添加了新的GDK方法,如:File.renameTo(String path)等。查看1.7.4发布文档:http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&version=16563

 

 

Groovy 1.8.0-beta-1

此版本主要是针对1.7中bug的修复和性能的提升,1.8.0最终版将在今年年底发布。

 

改进:

  • closures are now "callable" (inheriting from java.util.concurrent.Callable)
  • new AST transformations like
    • @Log to inject a logger in your classes
    • @ScriptField for creating a field in a script (should be renamed to @Field in the next beta)
    • @PackageScope now working also on methods and classes (not just fields as before)
    • @Synchronized for providing safer synchronization semantics
    • @InheritConstructors to inherit constructors, like often the case when extending exception classes
    • @IndexedProperties to add JavaBeans indexed property support
    • @AutoClone providing automatic cloning support to your beans
    • @AutoExternalize providing automatic externalization of your POGOs
    • @Canonical adding proper equals(), hashCode(), toString() methods
    • @EqualsAndHashCode adding an equals() and hashCode() method
    • @ToString for creating a default readable toString() method
    • @TupleConstructor for adding a tuple constructor
  • an additional syntax for strings, with $/.../$, to circumvent various escaping corner cases, like for example $/a/b\c$$ $//$
  • new GDK methods like Map.countBy{}, Map.collectEntries{}, Date.putAt() (subscript operator), Date.updated()
  • + obviously all other incremental improvements and new features from the Groovy 1.7 branch like
    • the new String methods like tr(), stripMargin(), stripIndent(), (un)expand(), 
    • Map's withDefault{} method, 
    • Closure's ncury() and rcury()
    • Sql's withBatch{} and withTransaction{}

查看详细发布文档:http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&version=16013

 

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 开源中国社区 [http://www.oschina.net]
本文标题:Groovy 1.7.4 和1.8.0-beta-1版本发布
加载中
返回顶部
顶部