Refactor wrapping native java classes