com.amazonaws.codegen.utils

## Class ModelLoaderUtils

- java.lang.Object
- - com.amazonaws.codegen.utils.ModelLoaderUtils

    public class ModelLoaderUtils
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`ModelLoaderUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ModelLoaderUtils

    public ModelLoaderUtils()

### Method Detail

#### loadModel

    public static ServiceModel loadModel(String modelLocation)

#### loadConfigurationModel

    public static <T> T loadConfigurationModel(Class<T> clzz,
                                               String configurationFileLocation)

Deserialize the contents of a given configuration file.

Parameters:
  `clzz` - Class to deserialize into
  `configurationFileLocation` - Location of config file to load
Returns:
  Marshalled configuration class

#### getRequiredResourceAsStream

    public static InputStream getRequiredResourceAsStream(String location)

Return an InputStream of the specified resource, failing if it can't be found.

Parameters:
  `location` - Location of resource

#### loadModel

    public static <T> T loadModel(Class<T> clzz,
                                  File file)

#### loadOptionalModel

    public static <T> Optional<T> loadOptionalModel(Class<T> clzz,
                                                    File file)