/** * Adds a Rule to be fired on given pattern. * Pattern matching is delegated to wrapped implementation. */ public void add(String pattern, Rule rule) { wrappedRules.add(pattern, rule); allRules.add(rule); } }
/** * Register a new Rule instance matching a pattern which is constructed * by concatenating the pattern prefix with the given pattern. */ public void add(String pattern, Rule rule) { StringBuffer buffer = new StringBuffer(); buffer.append(prefix); if (!pattern.startsWith("/")) { buffer.append('/'); } buffer.append(pattern); delegate.add(buffer.toString(), rule); }
/** * <p>Register a new Rule matching the specified pattern. * This method sets the <code>Digester</code> property on the rule.</p> * * @param pattern Element matching pattern * @param rule Rule to be registered */ public void addRule(String pattern, Rule rule) { rule.setDigester(this); getRules().add(pattern, rule); }
decoratedRules.add(pattern, rule);
/** * Adds a Rule to be fired on given pattern. * Pattern matching is delegated to wrapped implementation. */ public void add(String pattern, Rule rule) { wrappedRules.add(pattern, rule); allRules.add(rule); } }
/** * Register a new Rule instance matching a pattern which is constructed * by concatenating the pattern prefix with the given pattern. */ public void add(String pattern, Rule rule) { StringBuffer buffer = new StringBuffer(); buffer.append(prefix); if (!pattern.startsWith("/")) { buffer.append('/'); } buffer.append(pattern); delegate.add(buffer.toString(), rule); }
/** * 登记规则. * * @param pattern 匹配模板 * @param rule 要登记的规则 */ public void add(String pattern, Rule rule) { if (context.length() > 0 && !(rule instanceof SetContextRule) && CONTEXT_INITIALIZING.equals(contextStatus.get(context))) { rule = new ContextSensitiveRule(rule, context); } rules.add(pattern, rule); }
/** * <p>Register a new Rule matching the specified pattern. * This method sets the <code>Digester</code> property on the rule.</p> * * @param pattern Element matching pattern * @param rule Rule to be registered */ public void addRule(String pattern, Rule rule) { rule.setDigester(this); getRules().add(pattern, rule); }
decoratedRules.add(pattern, rule);