Class FileDescriptorUtils

java.lang.Object
io.apicurio.registry.utils.protobuf.schema.FileDescriptorUtils

public class FileDescriptorUtils extends Object
Author:
Fabian Martinez, Ravindranath Kakarla, Carles Arnal
  • Field Details

    • DEFAULT_LOCATION

      public static final com.squareup.wire.schema.Location DEFAULT_LOCATION
  • Constructor Details

    • FileDescriptorUtils

      public FileDescriptorUtils()
  • Method Details

    • baseDependencies

      public static com.google.protobuf.Descriptors.FileDescriptor[] baseDependencies()
    • protoFileToFileDescriptor

      public static com.google.protobuf.Descriptors.FileDescriptor protoFileToFileDescriptor(com.squareup.wire.schema.internal.parser.ProtoFileElement element) throws com.google.protobuf.Descriptors.DescriptorValidationException
      Throws:
      com.google.protobuf.Descriptors.DescriptorValidationException
    • protoFileToFileDescriptor

      public static com.google.protobuf.Descriptors.FileDescriptor protoFileToFileDescriptor(com.squareup.wire.schema.internal.parser.ProtoFileElement element, String protoFileName) throws com.google.protobuf.Descriptors.DescriptorValidationException
      Throws:
      com.google.protobuf.Descriptors.DescriptorValidationException
    • protoFileToFileDescriptor

      public static com.google.protobuf.Descriptors.FileDescriptor protoFileToFileDescriptor(String schemaDefinition, String protoFileName, Optional<String> optionalPackageName) throws com.google.protobuf.Descriptors.DescriptorValidationException
      Throws:
      com.google.protobuf.Descriptors.DescriptorValidationException
    • protoFileToFileDescriptor

      public static com.google.protobuf.Descriptors.FileDescriptor protoFileToFileDescriptor(String schemaDefinition, String protoFileName, Optional<String> optionalPackageName, Map<String,String> schemaDefs, Map<String,com.google.protobuf.Descriptors.FileDescriptor> dependencies) throws com.google.protobuf.Descriptors.DescriptorValidationException
      Throws:
      com.google.protobuf.Descriptors.DescriptorValidationException
    • fileDescriptorWithDepsToProtoFile

      public static com.squareup.wire.schema.internal.parser.ProtoFileElement fileDescriptorWithDepsToProtoFile(com.google.protobuf.Descriptors.FileDescriptor file, Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies)
    • fileDescriptorToProtoFile

      public static com.squareup.wire.schema.internal.parser.ProtoFileElement fileDescriptorToProtoFile(com.google.protobuf.DescriptorProtos.FileDescriptorProto file)
    • toDescriptor

      public static com.google.protobuf.Descriptors.Descriptor toDescriptor(String name, com.squareup.wire.schema.internal.parser.ProtoFileElement protoFileElement, Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies)
    • firstMessage

      public static com.squareup.wire.schema.internal.parser.MessageElement firstMessage(com.squareup.wire.schema.internal.parser.ProtoFileElement fileElement)
    • findOption

      public static Optional<com.squareup.wire.schema.internal.parser.OptionElement> findOption(String name, List<com.squareup.wire.schema.internal.parser.OptionElement> options)
    • toMapField

      public static String toMapField(String s)