finish udf-java refactoring