class ResolveByTypeStrategy implements IResolveDependencyStrategy, IAdditionDependencyStrategy {

    @Override
    public <T> T resolve(final Object... args) throws ResolveDependencyStrategyException {
        try {
            IResolveDependencyStrategy strategy = cacheStrategiesMap.get(args[0].getClass());
            if (strategy == null) {
                for (Map.Entry<Class, IResolveDependencyStrategy> entry : resolveStrategies.entrySet()) {
                    if (entry.getKey().isInstance(args[0])) {
                        strategy = entry.getValue();
                        cacheStrategiesMap.put(args[0].getClass(), strategy);
                        break;
                    }
                }
            }

            Object result = strategy.resolve(args[0]);
            return (T) result;
        } catch (Exception e) {
            throw new ResolveDependencyStrategyException("Object resolution failed.", e);
        }
    }

    public  ResolveByTypeStrategy();

}