private static void verifyObjectInspector(ObjectInspectorOptions option, ObjectInspector oi,
      ObjectInspectorOptions checkOption, Class<?>[] classes) {

    if (option.equals(checkOption)) {
      for (Class<?> checkClass : classes) {
        if (oi.getClass().equals(checkClass)) {
          throw new RuntimeException(
            "Cannot call getObjectInspectorByReflection with more then one of " +
            Arrays.toString(ObjectInspectorOptions.values()) + "!");
        }
      }
    }
  }
Verify that we don't have an unexpected type of object inspector.
@param option The option to verify
@param oi The ObjectInspector to verify
@param checkOption We're only interested in this option type
@param classes ObjectInspector should not be of these types
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java