As far as I know groovy code is translated into java byte-code before being interpreted, so everything possible with groovy should be possible with java too. Its just the different way to use it.