Rewrite it in Kotlin
Kotlin is Java backward compatible and it makes programming much easier without all the boilerplates and stuff, for example no need for explicit type, just use var
, much more intuitive constructor injection and much better support for lambda calculus