code: public static Class<? extends Message> getProtobufClass(String protoClassName) {
      try {
        // try Pig's loader
        Class<?> protoClass = getClass(protoClassName);
        return protoClass.asSubclass(Message.class);
      } catch (RuntimeException e) {
        // try normal loader first (handles inner class).
        return Protobufs.getProtobufClass(protoClassName);
      }
    }
docs: Returns class using Pig's class loader.
  If that fails tries {@link Protobufs#getProtobufClass(String)} to
  resolve the class