/** * Register a new Rule instance matching the specified pattern. * * @param pattern Nesting pattern to be matched for this Rule * @param rule Rule instance to be registered */ @Override public void add(String pattern, Rule rule) { super.add(pattern, rule); counter++; order.put(rule, counter); }
/** * Constructor for top-level Rules objects. Exactly one of these must * be created and installed into the Digester instance as the Rules * object before parsing starts. */ public PluginRules() { this(new RulesBase()); }
/** * Return a List of all registered Rule instances that match the specified * nesting pattern, or a zero-length List if there are no matches. If more * than one Rule instance matches, they <strong>must</strong> be returned * in the order originally registered through the <code>add()</code> * method. * * @param pattern Nesting pattern to be matched * * @deprecated Call match(namespaceURI,pattern) instead. */ @Deprecated public List<Rule> match(String pattern) { return (match(null, pattern)); }
/** * Return a List of all registered Rule instances that match the specified * nesting pattern, or a zero-length List if there are no matches. If more * than one Rule instance matches, they <strong>must</strong> be returned * in the order originally registered through the <code>add()</code> * method. * * @param pattern Nesting pattern to be matched * * @deprecated Call match(namespaceURI,pattern) instead. */ public List<Rule> match(String pattern) { return (match(null, pattern)); }
/** * Return the <code>Rules</code> implementation object containing our * rules collection and associated matching policy. If none has been * established, a default implementation will be created and returned. */ public Rules getRules() { if (this.rules == null) { this.rules = new RulesBase(); this.rules.setDigester(this); } return (this.rules); }
/** * Register a new Rule instance matching the specified pattern. * * @param pattern Nesting pattern to be matched for this Rule * @param rule Rule instance to be registered */ public void add(String pattern, Rule rule) { super.add(pattern, rule); counter++; order.put(rule, counter); }
protected List lookup(String namespaceURI, String pattern) { return super.lookup(namespaceURI, _caseSensitive ? pattern : pattern.toLowerCase()); } }
decoratedRules = new RulesBase(); } else { decoratedRules = rulesFactory.newRules(digester, pluginClass);
public void add(String pattern, Rule rule) { super.add(_caseSensitive ? pattern : pattern.toLowerCase(), rule); }
/** 创建默认的<code>Rules</code>. */ public ContextSensitiveRules() { this(new RulesBase()); }
/** * Constructor for top-level Rules objects. Exactly one of these must * be created and installed into the Digester instance as the Rules * object before parsing starts. */ public PluginRules() { this(new RulesBase()); }
/** * Return the <code>Rules</code> implementation object containing our * rules collection and associated matching policy. If none has been * established, a default implementation will be created and returned. */ public Rules getRules() { if (this.rules == null) { this.rules = new RulesBase(); this.rules.setDigester(this); } return (this.rules); }
decoratedRules = new RulesBase(); } else { decoratedRules = rulesFactory.newRules(digester, pluginClass);