// Path: heartbeat-common/src/main/java/com/heartbeat/common/json/ObjectMapper.java
// public class ObjectMapper {
// 
//     private static final org.boon.json.ObjectMapper instance = JsonFactory.createUseAnnotations(true);
// 
//     public static org.boon.json.ObjectMapper getInstance() {
//         return instance;
//     }
// }


import com.heartbeat.common.json.ObjectMapper;
import java.io.InputStream;
package com.heartbeat.common.conf;



/**
 * An abstract class for the all configurations classes to extend.
 * It provides necessary methods for loading configuration object from several formats.
 */
public abstract class Configuration {

    /**
     * It provides necessary methods for loading configuration object from JSON format
     * Reads configuration file. Deserializes it with boon
     *
     * @param inputStream
     * @param configClass
     * @return
     */
    public final static <T extends Configuration> T loadJson(InputStream inputStream, Class<T> configClass) throws ConfigurationException {
        try {
// Path: heartbeat-common/src/main/java/com/heartbeat/common/json/ObjectMapper.java
// public class ObjectMapper {
// 
//     private static final org.boon.json.ObjectMapper instance = JsonFactory.createUseAnnotations(true);
// 
//     public static org.boon.json.ObjectMapper getInstance() {
//         return instance;
//     }
// }


// Path: heartbeat-common/src/main/java/com/heartbeat/common/conf/Configuration.java
import com.heartbeat.common.json.ObjectMapper;
import java.io.InputStream;

package com.heartbeat.common.conf;



/**
 * An abstract class for the all configurations classes to extend.
 * It provides necessary methods for loading configuration object from several formats.
 */
public abstract class Configuration {

    /**
     * It provides necessary methods for loading configuration object from JSON format
     * Reads configuration file. Deserializes it with boon
     *
     * @param inputStream
     * @param configClass
     * @return
     */
    public final static <T extends Configuration> T loadJson(InputStream inputStream, Class<T> configClass) throws ConfigurationException {
        try {
            T config = ObjectMapper.getInstance().readValue(inputStream, configClass);