class ResolveByNameIocStrategy implements IResolveDependencyStrategy {

    @Override
    public <T> T resolve(final Object... args)
            throws ResolveDependencyStrategyException {
        try {
            Object result = storage.get((String) args[0]);
            if (null == result) {
                result = strategy.apply(args);
                storage.put((String) args[0], result);
            }
            return (T) result;
        } catch (Exception e) {
            throw new ResolveDependencyStrategyException("Object resolution failed.", e);
        }
    }

    public  ResolveByNameIocStrategy(final Function<Object[], Object> strategy);

}