[Java] Fix calling trait methods which return simple enums from C