public class ModelLoaderUtils extends Object
| Constructor and Description |
|---|
ModelLoaderUtils() |
| 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 ServiceModel |
loadModel(String modelLocation) |
static <T> Optional<T> |
loadOptionalModel(Class<T> clzz,
File file) |
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 © 2023. All rights reserved.