@Override
    public <T> ValueParser<? extends T> getParser(Class<T> clazz)
            throws ParserFactoryException {
        Class<? extends ValueParser<?>> parserCls = parserClasses.get(clazz);
        if (parserCls != null) {
            try {
                @SuppressWarnings("unchecked")
                ValueParser<? extends T> parser = 
                (ValueParser<? extends T>) parserCls.newInstance();
                return parser;
            } catch (InstantiationException e) {
                throw new ParserFactoryException(e);
            } catch (IllegalAccessException e) {
                throw new ParserFactoryException(e);
            }
        } else if (parent != null) {
            return parent.getParser(clazz);
        } else {
            throw new MissingParserException(clazz);
        }
    }