Class DescriptorLoader
java.lang.Object
tools.jackson.dataformat.protobuf.schema.DescriptorLoader
Class used for loading protobuf descriptors (from .desc files
or equivalent sources), to construct FileDescriptorSet.
- Since:
- 2.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final tools.jackson.databind.ObjectReaderFully configured reader forFileDescriptorSetobjects.protected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DescriptorLoaderconstruct(tools.jackson.databind.ObjectMapper mapper, ProtobufSchemaLoader schemaLoader) static DescriptorLoaderconstruct(ProtobufMapper mapper) load(InputStream in) Note: passedInputStreamwill be closed by this method.Note: passedReaderwill be closed by this method.
-
Field Details
-
DESCRIPTOR_PROTO
- See Also:
-
_reader
protected final tools.jackson.databind.ObjectReader _readerFully configured reader forFileDescriptorSetobjects.
-
-
Constructor Details
-
DescriptorLoader
public DescriptorLoader(tools.jackson.databind.ObjectReader reader) - Parameters:
reader-ObjectReaderthat is able to read protobuf input (that is, must have been created fromProtobufMapper, or regular mapper withProtobufFactory), and has been configured with `protoc` definition of `descriptor.proro`
-
-
Method Details
-
construct
- Throws:
IOException
-
construct
public static DescriptorLoader construct(tools.jackson.databind.ObjectMapper mapper, ProtobufSchemaLoader schemaLoader) throws IOException - Parameters:
mapper-ObjectMapperthat can read protoc content.- Throws:
IOException
-
load
- Throws:
IOException
-
load
- Throws:
IOException
-
load
Note: passedInputStreamwill be closed by this method.- Throws:
IOException
-
load
Note: passedReaderwill be closed by this method.- Throws:
IOException
-