首页> 外文会议>IEEE/ACM International Conference on Automated Software Engineering >Defaultification refactoring: A tool for automatically converting Java methods to default
【24h】

Defaultification refactoring: A tool for automatically converting Java methods to default

机译:缺省重构:一种将Java方法自动转换为缺省方法的工具

获取原文

摘要

Enabling interfaces to declare (instance) method implementations, Java 8 default methods can be used as a substitute for the ubiquitous skeletal implementation software design pattern. Performing this transformation on legacy software manually, though, may be non-trivial. The refactoring requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods. All of this is necessary to preserve type-correctness and confirm semantics preservation. We demonstrate an automated refactoring tool called MIGRATE Skeletal Implementation to Interface for transforming legacy Java code to use the new default construct. The tool, implemented as an Eclipse plug-in, is driven by an efficient, fully-automated, type constraint-based refactoring approach. It features an extensive rule set covering various corner-cases where default methods cannot be used. The resulting code is semantically equivalent to the original, more succinct, easier to comprehend, less complex, and exhibits increased modularity. A demonstration can be found at http://youtu.be/YZHIy0yePh8.
机译:通过启用接口来声明(实例)方法实现,Java 8默认方法可以用作无处不在的骨架实现软件设计模式的替代品。但是,手动在旧版软件上执行此转换可能并非易事。重构需要分析复杂的类型层次结构,解决多个实现继承问题,协调类和接口方法之间的差异,并使用重载的类方法分析平局决胜(调度优先级)。所有这些对于保留类型正确性和确认语义保留都是必需的。我们演示了一种称为MIGRATE骨架实现到接口的自动化重构工具,该工具可以将旧版Java代码转换为使用新的默认构造。该工具以Eclipse插件的形式实现,由高效,全自动,基于类型约束的重构方法驱动。它具有广泛的规则集,涵盖了无法使用默认方法的各种极端情况。生成的代码在语义上等效于原始代码,更加简洁,易于理解,复杂程度更低,并且模块化程度更高。可以在http://youtu.be/YZHIy0yePh8上找到演示。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号