Yes, it's possible to a similar fidelity that a Java decompiler can manage (meaning: the code will look similar, but not necessarily identical).
You'd need a dedicated decompiler for each language, however.
Edit: I think I need to clarify what level of fidelity I'd expect:
- The names of local variables may or may not be reproducable
- Loop types might be mis-interpreted (
for
replaced by while
, ...)
- More general: Things that can be done in two similar ways might be mis-interpreted
- ...
All of those are errors that also occur on decompiling Java code, simply because the association from byte code to Java source code is not 1:1.
However, if you have a dedicated Groovy decompiler, then I strongly suspect it to produce much more readable code from decompiling compiled Groovy code than a Java decompiler ever could.