This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Java to Scala conversion

2 replies
Timo Westkämper
Joined: 2012-01-09,
User offline. Last seen 42 years 45 weeks ago.
Hi.

I am not sure if this is the right forum for this post, so forgive me, if it isn't.

I just published a tool called Scalagen on GitHub : https://github.com/mysema/scalagen

Scalagen aims to convert Java to Scala sources. It is inspired by Jatran, but aims to be more modular and focusing more on idiomatic Scala than 100 % compilable code.

The results are to be seen as a starting point for a Java to Scala conversion effort, not as the final result.

The latest release contains a working Maven plugin, but SBT integration might be added in the future.

Br,
Timo Westkämper
Jason Zaugg
Joined: 2009-05-18,
User offline. Last seen 38 weeks 5 days ago.
Re: Java to Scala conversion

On Mon, Jan 9, 2012 at 10:00 AM, Timo Westkämper <timo [dot] westkamper [at] mysema [dot] com> wrote:
I just published a tool called Scalagen on GitHub : https://github.com/mysema/scalagen

Scalagen aims to convert Java to Scala sources. It is inspired by Jatran, but aims to be more modular and focusing more on idiomatic Scala than 100 % compilable code.

The results are to be seen as a starting point for a Java to Scala conversion effort, not as the final result.

The latest release contains a working Maven plugin, but SBT integration might be added in the future.

Hi Timo,
In case you didn't find these already, I thought I'd point out a bit of prior art.
Basic support for this exists in the IntelliJ Scala Plugin. (Code [1] / Tests [2])
Before he started working on scalac itself, Paul Phillips tinkered with Scalify (Slides [3] / Video [4]), an IDE independent translator.
-jason
[1] http://git.jetbrains.org/?p=idea/scala-plugin.git;a=blob;f=src/org/jetbrains/plugins/scala/conversion/JavaToScala.scala;h=df3de95c2675c08e7ce74d3553cf9e6e498e40a9;hb=HEAD [2] http://git.jetbrains.org/?p=idea/scala-plugin.git;a=tree;f=testdata/conversion;hb=HEAD  [3] http://www.wiki.jvmlangsummit.com/Scalify[4] http://video.google.com/videoplay?docid=-3493190786110154189
Timo Westkämper
Joined: 2012-01-09,
User offline. Last seen 42 years 45 weeks ago.
Re: Java to Scala conversion
Hi Jason.

Thanks for the links. I was aware of the Intellij Scala plugin, but not of Scalify.

I will look into the Scalify slides.

Br,
Timo

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland