@Beta public class CodecJackson extends Object
Jackson.defaultCodec()
or used indirectly from the static helper methods in Configs.| Constructor and Description |
|---|
CodecJackson(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
PluginRegistry pluginRegistry,
com.typesafe.config.Config globalDefaults,
javax.validation.Validator validator) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
decodeObject(Class<T> type,
com.typesafe.config.Config config)
Instantiate an object of the requested type based on the provided config.
|
<T> T |
decodeObject(Class<T> type,
com.typesafe.config.ConfigValue configValue) |
<T> T |
decodeObject(Class<T> type,
com.fasterxml.jackson.databind.JsonNode jsonNode) |
<T> T |
decodeObject(Class<T> type,
String configText)
Tries to parse the string as an isolated typesafe-config object, tries to resolve it, and then calls
decodeObject(Class, Config) with the resultant config and the passed in type. |
<T> T |
decodeObject(com.typesafe.config.Config config)
Instantiate an object without a compile time expected type.
|
<T> T |
decodeObject(String configText)
Instantiate an object without a compile time expected type.
|
<T> T |
decodeObject(String category,
com.typesafe.config.Config config)
Instantiate an object of the requested category based on the provided config.
|
<T> T |
decodeObject(String category,
String configText)
Tries to parse the string as an isolated typesafe-config object, tries to resolve it, and then calls
decodeObject(String, Config) with the resultant config and the passed in category. |
com.typesafe.config.Config |
getGlobalDefaults() |
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
PluginRegistry |
getPluginRegistry() |
javax.validation.Validator |
getValidator() |
<T> T |
newDefault(Class<T> type)
Construct an object of the requested type based on the default values and types (if the requested
is not a concrete class).
|
<T> T |
newDefault(String category)
Construct an object of the requested plugin category based on the default type and values
|
<T> T |
validate(T value) |
CodecJackson |
withConfig(com.typesafe.config.Config newGlobalDefaults) |
CodecJackson |
withOverrides(com.typesafe.config.Config overrides) |
public CodecJackson(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
PluginRegistry pluginRegistry,
com.typesafe.config.Config globalDefaults,
javax.validation.Validator validator)
public CodecJackson withConfig(com.typesafe.config.Config newGlobalDefaults)
public CodecJackson withOverrides(com.typesafe.config.Config overrides)
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public PluginRegistry getPluginRegistry()
public com.typesafe.config.Config getGlobalDefaults()
public javax.validation.Validator getValidator()
public <T> T newDefault(@Nonnull Class<T> type) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T decodeObject(@Nonnull Class<T> type, com.typesafe.config.ConfigValue configValue) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T decodeObject(@Nonnull Class<T> type, com.fasterxml.jackson.databind.JsonNode jsonNode) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic <T> T newDefault(@Nonnull String category) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T decodeObject(@Nonnull String category, @Syntax(value="HOCON") String configText) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
decodeObject(String, Config) with the resultant config and the passed in category. Pretty much just
a convenience function for simple use cases that don't want to care about how ConfigFactory works.com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T decodeObject(@Nonnull Class<T> type, @Syntax(value="HOCON") String configText) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
decodeObject(Class, Config) with the resultant config and the passed in type. Pretty much just
a convenience function for simple use cases that don't want to care about how ConfigFactory works.com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T decodeObject(@Nonnull String category, @Nonnull com.typesafe.config.Config config) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T decodeObject(@Nonnull Class<T> type, com.typesafe.config.Config config) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T decodeObject(@Syntax(value="HOCON") String configText) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T decodeObject(com.typesafe.config.Config config)
throws com.fasterxml.jackson.core.JsonProcessingException,
IOException
com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic <T> T validate(T value)
Copyright © 2015 AddThis. All rights reserved.