In case someone is interested to know if a plugin can be written in (pure) Java instead Groovy, here you can find a toy I'm working on
Don't pay so much attention to the "business logic" (factories, functions, ...) but how you can implement them in Java
https://jorgeaguileraseqera.github.io/nf-biojava