class PrefixedPatternDefinitionResolver extends
        AbstractPatternDefinitionResolver<T> {

    @Override
    protected Map<String, Definition> addDefinitionsAsPatternMatchers(
            List<DefinitionPatternMatcher> matchers,
            Map<String, Definition> defsMap) {
        Set<String> excludedKeys = new LinkedHashSet<String>();
        for (Map.Entry<String, Definition> entry : defsMap.entrySet()) {
            String key = entry.getKey();
            Expression expression = Expression
                    .createExpressionFromDescribedExpression(key);
            if (expression.getLanguage() != null) {
                DefinitionPatternMatcherFactory factory = language2matcherFactory
                        .get(expression.getLanguage());
                if (factory != null) {
                    DefinitionPatternMatcher matcher = factory
                            .createDefinitionPatternMatcher(expression
                                    .getExpression(), new Definition(entry
                                    .getValue()));
                    matchers.add(matcher);
                } else {
                    logger.warn("Cannot find a DefinitionPatternMatcherFactory for expression '{}'",
                            key);
                }
            } else {
                excludedKeys.add(key);
            }
        }
        return PatternUtil.createExtractedMap(defsMap, excludedKeys);
    }

    public  PrefixedPatternDefinitionResolver();

}