public final class ModelLoaderUtils extends Object
Modifier and Type | Method and Description |
---|---|
static InputStream |
getRequiredResourceAsStream(String location)
Return an InputStream of the specified resource, failing if it can't be found.
|
static <T> T |
loadConfigurationModel(Class<T> clzz,
String configurationFileLocation)
Deserialize the contents of a given configuration file.
|
static <T> T |
loadModel(Class<T> clzz,
File file) |
static <T> T |
loadModel(Class<T> clzz,
File file,
boolean failOnUnknownProperties) |
static ServiceModel |
loadModel(String modelLocation) |
static <T> Optional<T> |
loadOptionalModel(Class<T> clzz,
File file) |
static <T> Optional<T> |
loadOptionalModel(Class<T> clzz,
File file,
boolean failOnUnknownProperties) |
public static ServiceModel loadModel(String modelLocation)
public static <T> T loadConfigurationModel(Class<T> clzz, String configurationFileLocation)
clzz
- Class to deserialize intoconfigurationFileLocation
- Location of config file to loadpublic static InputStream getRequiredResourceAsStream(String location)
location
- Location of resourceCopyright © 2020. All rights reserved.