Remove unnecessary java reflection.