GROOVY-6624: prefactor work (not sure Java2Groovy needs CLI processing at all but split into it's own class for now)