Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Can pass file name instead of a input #6

Open
darielopper opened this issue Mar 28, 2019 · 1 comment
Open

Can pass file name instead of a input #6

darielopper opened this issue Mar 28, 2019 · 1 comment

Comments

@darielopper
Copy link

darielopper commented Mar 28, 2019

Its posible in future version pass a scala class filename as argument and generate a java class file as output???

@Aivean
Copy link
Owner

Aivean commented Mar 28, 2019

I don't think that new version will happen any time soon. That being said, I think you can create your own script that pipes the source of your class into the tool and saves the result as a file.

I tried following and it worked:

 cat  EncodingUtil.scala | grep -Ev '^package' | java -jar ~/.scala-demystify.jar  > EncodingUtil.java

grep -Ev '^package' was needed as compiler expects default package. Obviously, any non standard imports will not work (the tool tries to compile a single file, it's unaware of your dependencies).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants