@Beta public final class Configs extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
decodeObject(Class<T> type,
com.typesafe.config.Config config)
Instantiate an object of the requested type based on the provided config.
|
static <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. |
static <T> T |
decodeObject(com.typesafe.config.Config config)
Instantiate an object without a compile time expected type.
|
static <T> T |
decodeObject(String configText)
Instantiate an object without a compile time expected type.
|
static <T> T |
decodeObject(String category,
com.typesafe.config.Config config)
Instantiate an object of the requested category based on the provided config.
|
static <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. |
static com.typesafe.config.ConfigValue |
expandSugar(Class<?> type,
com.typesafe.config.ConfigValue config,
PluginRegistry pluginRegistry) |
static com.typesafe.config.ConfigValue |
expandSugar(com.typesafe.config.Config config,
PluginRegistry pluginRegistry) |
static <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).
|
static <T> T |
newDefault(String category)
Construct an object of the requested plugin category based on the default type and values
|
public static <T> T newDefault(@Nonnull Class<T> type) throws IOException
IOExceptionpublic static <T> T newDefault(@Nonnull String category) throws IOException
IOExceptionpublic static <T> T decodeObject(@Nonnull Class<T> type, @Nonnull com.typesafe.config.Config config) throws IOException
IOExceptionpublic static <T> T decodeObject(@Nonnull String category, @Nonnull com.typesafe.config.Config config) throws IOException
IOExceptionpublic static <T> T decodeObject(@Nonnull Class<T> type, @Syntax(value="HOCON")@Nonnull String configText) throws 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.IOExceptionpublic static <T> T decodeObject(@Nonnull String category, @Syntax(value="HOCON")@Nonnull String configText) throws 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.IOExceptionpublic static <T> T decodeObject(@Syntax(value="HOCON") String configText) throws IOException
IOExceptionpublic static <T> T decodeObject(com.typesafe.config.Config config)
throws IOException
IOExceptionpublic static com.typesafe.config.ConfigValue expandSugar(com.typesafe.config.Config config,
PluginRegistry pluginRegistry)
public static com.typesafe.config.ConfigValue expandSugar(Class<?> type, com.typesafe.config.ConfigValue config, PluginRegistry pluginRegistry)
Copyright © 2015 AddThis. All rights reserved.