wrap invoke Java with types