Updating visitor protocol based on the java version changes.