Minort code shuffling to easy jruby class generation