code: public void add(final FieldDescriptor type) {
      if (type.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
        throw new IllegalArgumentException(
          "ExtensionRegistry.add() must be provided a default instance when " +
          "adding an embedded message extension.");
      }
      add(new ExtensionInfo(type, null));
    }
docs: Add a non-message-type extension to the registry by descriptor.