Class JavaPropsMapper
- All Implemented Interfaces:
Serializable,tools.jackson.core.TreeCodec<tools.jackson.databind.JsonNode>,tools.jackson.core.Versioned
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBase implementation for "Vanilla"ObjectMapper, used with Java Properties backend.private static final classHelper class to contain dynamically constructed "shared" instance of mapper, should one be needed viashared(). -
Field Summary
FieldsFields inherited from class tools.jackson.databind.ObjectMapper
_deserializationConfig, _deserializationContexts, _injectableValues, _rootDeserializers, _savedBuilderState, _serializationConfig, _serializationContexts, _streamFactory, _typeFactory -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected Properties_env()static JavaPropsMapper.Builderbuilder()static JavaPropsMapper.Builderbuilder(JavaPropsFactory streamFactory) <T> TreadEnvVariablesAs(JavaPropsSchema schema, Class<T> valueType) Convenience method, functionally equivalent to:<T> TreadEnvVariablesAs(JavaPropsSchema schema, tools.jackson.databind.JavaType valueType) Convenience method, functionally equivalent to:<T> TConvenience method, functionally equivalent to:<T> TConvenience method, functionally equivalent to:<T> TConvenience method which uses given `Properties` as the source as if they had been read from an external source, processes them (splits paths etc), and then binds as given result value.<T> TreadMapAs(Map<String, String> map, JavaPropsSchema schema, tools.jackson.databind.JavaType valueType) Convenience method which uses given `Properties` as the source as if they had been read from an external source, processes them (splits paths etc), and then binds as given result value.<T> TreadPropertiesAs(Properties props, Class<T> valueType) Convenience method, functionally equivalent to:<T> TreadPropertiesAs(Properties props, tools.jackson.databind.JavaType valueType) Convenience method, functionally equivalent to:<T> TreadPropertiesAs(Properties props, JavaPropsSchema schema, Class<T> valueType) Convenience method which uses given `Properties` as the source as if they had been read from an external source, processes them (splits paths etc), and then binds as given result value.<T> TreadPropertiesAs(Properties props, JavaPropsSchema schema, tools.jackson.databind.JavaType valueType) Convenience method which uses given `Properties` as the source as if they had been read from an external source, processes them (splits paths etc), and then binds as given result value.protected Object<T> TreadSystemPropertiesAs(JavaPropsSchema schema, Class<T> valueType) Convenience method, functionally equivalent to:<T> TreadSystemPropertiesAs(JavaPropsSchema schema, tools.jackson.databind.JavaType valueType) Convenience method, functionally equivalent to:rebuild()static JavaPropsMappershared()Accessor method for getting globally shared "default"JavaPropsMapperinstance: one that has default configuration, no modules registered, no config overrides.tools.jackson.core.Versionversion()protected ObjectvoidwriteValue(Map<?, ?> target, Object value) Convenience method that "writes" given `value` as properties in givenMapobject.voidwriteValue(Map<?, ?> target, Object value, JavaPropsSchema schema) Convenience method that "writes" given `value` as properties in givenMapobject.writeValueAsMap(Object value) Convenience method that serializes given value but so that results are stored in a newly constructedProperties.writeValueAsMap(Object value, JavaPropsSchema schema) Convenience method that serializes given value but so that results are stored in givenPropertiesinstance.writeValueAsProperties(Object value) Convenience method that serializes given value but so that results are stored in a newly constructedProperties.writeValueAsProperties(Object value, JavaPropsSchema schema) Convenience method that serializes given value but so that results are stored in givenPropertiesinstance.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, 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, treeToValue, treeToValue, treeToValue, updateValue, valueToTree, writer, writer, writer, writer, writer, writer, writer, writer, writer, writer, writerFor, writerFor, writerFor, writerWithDefaultPrettyPrinter, writerWithView, writeTree, writeValue, writeValue, writeValue, writeValue, writeValue, writeValue, writeValueAsBytes, writeValueAsString, writeValueIntoBuffer
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
JavaPropsMapper
public JavaPropsMapper() -
JavaPropsMapper
-
JavaPropsMapper
-
-
Method Details
-
builder
-
builder
-
rebuild
- Overrides:
rebuildin classtools.jackson.databind.ObjectMapper
-
writeReplace
- Overrides:
writeReplacein classtools.jackson.databind.ObjectMapper
-
readResolve
- Overrides:
readResolvein 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
-
readPropertiesAs
public <T> T readPropertiesAs(Properties props, JavaPropsSchema schema, Class<T> valueType) throws IOException Convenience method which uses given `Properties` as the source as if they had been read from an external source, processes them (splits paths etc), and then binds as given result value.Note that this is NOT identical to calling
ObjectMapper.convertValue(Object, Class); rather, it would be similar to writing `Properties` out into a File, then calling `readValue()` on this mapper to bind contents.- Throws:
IOException
-
readPropertiesAs
public <T> T readPropertiesAs(Properties props, JavaPropsSchema schema, tools.jackson.databind.JavaType valueType) throws IOException Convenience method which uses given `Properties` as the source as if they had been read from an external source, processes them (splits paths etc), and then binds as given result value.Note that this is NOT identical to calling
ObjectMapper.convertValue(Object, Class); rather, it would be similar to writing `Properties` out into a File, then calling `readValue()` on this mapper to bind contents.- Throws:
IOException
-
readPropertiesAs
Convenience method, functionally equivalent to:readPropertiesAs(props, JavaPropsSchema.emptySchema(), valueType);
- Throws:
IOException
-
readPropertiesAs
public <T> T readPropertiesAs(Properties props, tools.jackson.databind.JavaType valueType) throws IOException Convenience method, functionally equivalent to:readPropertiesAs(props, JavaPropsSchema.emptySchema(), valueType);
- Throws:
IOException
-
readMapAs
public <T> T readMapAs(Map<String, String> map, JavaPropsSchema schema, Class<T> valueType) throws IOExceptionConvenience method which uses given `Properties` as the source as if they had been read from an external source, processes them (splits paths etc), and then binds as given result value.Note that this is NOT identical to calling
ObjectMapper.convertValue(Object, Class); rather, it would be similar to writing `Properties` out into a File, then calling `readValue()` on this mapper to bind contents.- Throws:
IOException
-
readMapAs
public <T> T readMapAs(Map<String, String> map, JavaPropsSchema schema, tools.jackson.databind.JavaType valueType) throws IOExceptionConvenience method which uses given `Properties` as the source as if they had been read from an external source, processes them (splits paths etc), and then binds as given result value.Note that this is NOT identical to calling
ObjectMapper.convertValue(Object, Class); rather, it would be similar to writing `Properties` out into a File, then calling `readValue()` on this mapper to bind contents.- Throws:
IOException
-
readMapAs
Convenience method, functionally equivalent to:readPropertiesAs(props, JavaPropsSchema.emptySchema(), valueType);
- Throws:
IOException
-
readMapAs
public <T> T readMapAs(Map<String, String> map, tools.jackson.databind.JavaType valueType) throws IOExceptionConvenience method, functionally equivalent to:readPropertiesAs(props, JavaPropsSchema.emptySchema(), valueType);
- Throws:
IOException
-
readSystemPropertiesAs
Convenience method, functionally equivalent to:readPropertiesAs(System.getProperties(), schema, valueType);
- Throws:
IOException
-
readSystemPropertiesAs
public <T> T readSystemPropertiesAs(JavaPropsSchema schema, tools.jackson.databind.JavaType valueType) throws IOException Convenience method, functionally equivalent to:readPropertiesAs(System.getProperties(), schema, valueType);
- Throws:
IOException
-
readEnvVariablesAs
Convenience method, functionally equivalent to:readPropertiesAs(convertMapToProperties(System.getenv()), schema, valueType);
- Throws:
IOException
-
readEnvVariablesAs
public <T> T readEnvVariablesAs(JavaPropsSchema schema, tools.jackson.databind.JavaType valueType) throws IOException Convenience method, functionally equivalent to:readPropertiesAs(convertMapToProperties(System.getenv()), schema, valueType);
- Throws:
IOException
-
_env
-
writeValue
Convenience method that "writes" given `value` as properties in givenMapobject.- Throws:
IOException
-
writeValue
Convenience method that "writes" given `value` as properties in givenMapobject.- Throws:
IOException
-
writeValueAsProperties
Convenience method that serializes given value but so that results are stored in a newly constructedProperties. Functionally equivalent to serializing in a File and reading contents intoProperties.- Throws:
IOException
-
writeValueAsProperties
Convenience method that serializes given value but so that results are stored in givenPropertiesinstance.- Throws:
IOException
-
writeValueAsMap
Convenience method that serializes given value but so that results are stored in a newly constructedProperties. Functionally equivalent to serializing in a File and reading contents intoProperties.- Throws:
IOException
-
writeValueAsMap
Convenience method that serializes given value but so that results are stored in givenPropertiesinstance.- Throws:
IOException
-