Class FileDescriptorUtils
java.lang.Object
io.apicurio.registry.utils.protobuf.schema.FileDescriptorUtils
- Author:
- Fabian Martinez, Ravindranath Kakarla, Carles Arnal
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.protobuf.Descriptors.FileDescriptor[]static com.squareup.wire.schema.internal.parser.ProtoFileElementfileDescriptorToProtoFile(com.google.protobuf.DescriptorProtos.FileDescriptorProto file) static com.squareup.wire.schema.internal.parser.ProtoFileElementfileDescriptorWithDepsToProtoFile(com.google.protobuf.Descriptors.FileDescriptor file, Map<String, com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies) static Optional<com.squareup.wire.schema.internal.parser.OptionElement>findOption(String name, List<com.squareup.wire.schema.internal.parser.OptionElement> options) static com.squareup.wire.schema.internal.parser.MessageElementfirstMessage(com.squareup.wire.schema.internal.parser.ProtoFileElement fileElement) static com.google.protobuf.Descriptors.FileDescriptorprotoFileToFileDescriptor(com.squareup.wire.schema.internal.parser.ProtoFileElement element) static com.google.protobuf.Descriptors.FileDescriptorprotoFileToFileDescriptor(com.squareup.wire.schema.internal.parser.ProtoFileElement element, String protoFileName) static com.google.protobuf.Descriptors.FileDescriptorprotoFileToFileDescriptor(String schemaDefinition, String protoFileName, Optional<String> optionalPackageName) static com.google.protobuf.Descriptors.FileDescriptorprotoFileToFileDescriptor(String schemaDefinition, String protoFileName, Optional<String> optionalPackageName, Map<String, String> schemaDefs, Map<String, com.google.protobuf.Descriptors.FileDescriptor> dependencies) static com.google.protobuf.Descriptors.DescriptortoDescriptor(String name, com.squareup.wire.schema.internal.parser.ProtoFileElement protoFileElement, Map<String, com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies) static StringtoMapField(String s)
-
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, throws com.google.protobuf.Descriptors.DescriptorValidationExceptioncom.google.protobuf.Descriptors.FileDescriptor> dependencies) - Throws:
com.google.protobuf.Descriptors.DescriptorValidationException
-
fileDescriptorWithDepsToProtoFile
-
fileDescriptorToProtoFile
public static com.squareup.wire.schema.internal.parser.ProtoFileElement fileDescriptorToProtoFile(com.google.protobuf.DescriptorProtos.FileDescriptorProto file) -
toDescriptor
-
firstMessage
public static com.squareup.wire.schema.internal.parser.MessageElement firstMessage(com.squareup.wire.schema.internal.parser.ProtoFileElement fileElement) -
findOption
-
toMapField
-