/** * Try to resolve a wildcard definition. * * @param paths The list containing the currently stored paths. * @param name The name of the definition to resolve. * @return A definition, if found, or <code>null</code> if not. * @since 2.1.0 */ protected Definition resolveWildcardDefinition( List<WildcardMapping> paths, String name) { Map<Integer, String> vars = new HashMap<Integer, String>(); Definition d = null; for (WildcardMapping wm : paths) { if (wildcardHelper.match(vars, name, wm.getPattern())) { d = replaceDefinition(wm.getDefinition(), name, vars); break; } } return d; }