All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.needcoke.coke.web.exception.HandlerCacheMgmt Maven / Gradle / Ivy

package org.needcoke.coke.web.exception;

import java.util.HashMap;
import java.util.Map;

public enum HandlerCacheMgmt {
        instance
    ;

    private final Map cacheMap = new HashMap<>();

    public void addCache(HandlerCache cache){
        cacheMap.put(cache.getExceptionType().getTypeName(),cache);
    }

    public HandlerCache get(Class throwableClz){
        return cacheMap.get(throwableClz.getTypeName());
    }

    public boolean contains(Class throwableClz){
        return cacheMap.containsKey(throwableClz.getTypeName());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy