001    package org.tynamo.exceptionpage.services;
002    
003    import java.util.HashMap;
004    import java.util.Map;
005    import java.util.Map.Entry;
006    
007    import org.apache.tapestry5.services.ExceptionReporter;
008    
009    public class ExceptionHandlerImpl implements ExceptionHandler {
010            private Map<Class<? extends RuntimeException>, Class<? extends ExceptionReporter>> configuration = new HashMap<Class<? extends RuntimeException>, Class<? extends ExceptionReporter>>();
011    
012            @SuppressWarnings("unchecked")
013            public ExceptionHandlerImpl(Map<Class, Class> configuration) {
014                    for (Entry<Class, Class> entry : configuration.entrySet())
015                            this.configuration.put(entry.getKey(), entry.getValue());
016            }
017    
018            public Map<Class<? extends RuntimeException>, Class<? extends ExceptionReporter>> getConfiguration() {
019                    return configuration;
020            }
021    
022    }