Class ProtobufMapper
java.lang.Object
tools.jackson.databind.ObjectMapper
tools.jackson.dataformat.protobuf.ProtobufMapper
- All Implemented Interfaces:
Serializable,tools.jackson.core.TreeCodec,tools.jackson.core.Versioned
public class ProtobufMapper
extends tools.jackson.databind.ObjectMapper
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBase implementation for "Vanilla"ObjectMapper, used with Protobuf backend. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DescriptorLoaderLazily constructed instance ofDescriptorLoader, used for loading structured protoc definitions from multiple files.protected ProtobufSchemaLoaderFields inherited from class tools.jackson.databind.ObjectMapper
_deserializationConfig, _deserializationContexts, _injectableValues, _rootDeserializers, _savedBuilderState, _serializationConfig, _serializationContexts, _streamFactory, _typeFactory -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtobufMapper.Builderbuilder()static ProtobufMapper.Builderbuilder(ProtobufFactory streamFactory) Accessors that may be used instead of convenienceloadDescriptorSetmethods, if alternate sources need to be used.generateSchemaFor(Class<?> type) Convenience method for constructing protoc definition that matches given Java type.generateSchemaFor(tools.jackson.core.type.TypeReference<?> type) Convenience method for constructing protoc definition that matches given Java type.generateSchemaFor(tools.jackson.databind.JavaType type) Convenience method for constructing protoc definition that matches given Java type.loadDescriptorSet(File src) loadDescriptorSet(URL src) rebuild()Accessor for reusableProtobufSchemaLoaderwhich can be used for loading protoc definitions from files and other external sources.voidstatic ProtobufMappershared()Accessor method for getting globally shared "default"ProtobufMapperinstance: one that has default configuration, no modules registered, no config overrides.tools.jackson.core.Versionversion()Methods inherited from class tools.jackson.databind.ObjectMapper
_assertNotNull, _configAndWriteValue, _convert, _deserializationContext, _deserializationContext, _deserializationContext, _findRootDeserializer, _initForReading, _newReader, _newReader, _newWriter, _newWriter, _newWriter, _readMapAndClose, _readTreeAndClose, _readValue, _serializationContext, _serializationContext, _verifyNoTrailingTokens, _verifySchemaType, _writeCloseableValue, acceptJsonFormatVisitor, acceptJsonFormatVisitor, acceptJsonFormatVisitor, booleanNode, clearCaches, constructType, constructType, convertValue, convertValue, convertValue, createArrayNode, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createNonBlockingByteArrayParser, createNonBlockingByteBufferParser, createObjectNode, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, deserializationConfig, getInjectableValues, getNodeFactory, getTypeFactory, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, missingNode, nullNode, reader, reader, reader, reader, reader, reader, reader, reader, reader, readerFor, readerFor, readerFor, readerForArrayOf, readerForListOf, readerForMapOf, readerForUpdating, readerWithView, readResolve, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValues, readValues, readValues, registeredModules, serializationConfig, stringNode, treeAsTokens, treeToValue, treeToValue, treeToValue, updateValue, valueToTree, writer, writer, writer, writer, writer, writer, writer, writer, writer, writer, writeReplace, writerFor, writerFor, writerFor, writerWithDefaultPrettyPrinter, writerWithView, writeTree, writeValue, writeValue, writeValue, writeValue, writeValue, writeValue, writeValueAsBytes, writeValueAsString, writeValueIntoBuffer
-
Field Details
-
_schemaLoader
-
_descriptorLoader
Lazily constructed instance ofDescriptorLoader, used for loading structured protoc definitions from multiple files.
-
-
Constructor Details
-
ProtobufMapper
public ProtobufMapper() -
ProtobufMapper
-
ProtobufMapper
-
-
Method Details
-
builder
-
builder
-
rebuild
- Overrides:
rebuildin classtools.jackson.databind.ObjectMapper
-
version
public tools.jackson.core.Version version()- Specified by:
versionin interfacetools.jackson.core.Versioned- Overrides:
versionin classtools.jackson.databind.ObjectMapper
-
tokenStreamFactory
- Overrides:
tokenStreamFactoryin classtools.jackson.databind.ObjectMapper
-
schemaLoader
Accessor for reusableProtobufSchemaLoaderwhich can be used for loading protoc definitions from files and other external sources. -
setSchemaLoader
-
generateSchemaFor
Convenience method for constructing protoc definition that matches given Java type. UsesProtobufSchemaGeneratorfor generation.- Parameters:
type- Resolved type to generateProtobufSchemafor- Returns:
- Generated
ProtobufSchema
-
generateSchemaFor
Convenience method for constructing protoc definition that matches given Java type. UsesProtobufSchemaGeneratorfor generation.- Parameters:
type- Type-erased type to generateProtobufSchemafor- Returns:
- Generated
ProtobufSchema
-
generateSchemaFor
Convenience method for constructing protoc definition that matches given Java type. UsesProtobufSchemaGeneratorfor generation.- Parameters:
type- Type to generateProtobufSchemafor- Returns:
- Generated
ProtobufSchema
-
loadDescriptorSet
- Throws:
IOException
-
loadDescriptorSet
- Throws:
IOException
-
loadDescriptorSet
- Throws:
IOException
-
descriptorLoader
Accessors that may be used instead of convenienceloadDescriptorSetmethods, if alternate sources need to be used.- Throws:
IOException
-