converting scala class to java class using groovy