/** * 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) { // to help users who accidently add '/' to the end of their patterns int patternLength = pattern.length(); if (patternLength>1 && pattern.endsWith("/")) { pattern = pattern.substring(0, patternLength-1); } List<Rule> list = cache.get(pattern); if (list == null) { list = new ArrayList<Rule>(); cache.put(pattern, list); } list.add(rule); rules.add(rule); if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } }
/** * 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) { // to help users who accidently add '/' to the end of their patterns int patternLength = pattern.length(); if (patternLength>1 && pattern.endsWith("/")) { pattern = pattern.substring(0, patternLength-1); } List list = (List) cache.get(pattern); if (list == null) { list = new ArrayList(); cache.put(pattern, list); } list.add(rule); rules.add(rule); if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } }
/** * 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) { // to help users who accidently add '/' to the end of their patterns int patternLength = pattern.length(); if (patternLength>1 && pattern.endsWith("/")) { pattern = pattern.substring(0, patternLength-1); } List<Rule> list = cache.get(pattern); if (list == null) { list = new ArrayList<Rule>(); cache.put(pattern, list); } list.add(rule); rules.add(rule); if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } }
/** * 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) { // to help users who accidently add '/' to the end of their patterns int patternLength = pattern.length(); if (patternLength>1 && pattern.endsWith("/")) { pattern = pattern.substring(0, patternLength-1); } List<Rule> list = cache.get(pattern); if (list == null) { list = new ArrayList<Rule>(); cache.put(pattern, list); } list.add(rule); rules.add(rule); if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } }
/** * 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) { // to help users who accidently add '/' to the end of their patterns int patternLength = pattern.length(); if (patternLength>1 && pattern.endsWith("/")) { pattern = pattern.substring(0, patternLength-1); } List<Rule> list = cache.get(pattern); if (list == null) { list = new ArrayList<>(); cache.put(pattern, list); } list.add(rule); rules.add(rule); if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } }
/** * 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) { // to help users who accidently add '/' to the end of their patterns int patternLength = pattern.length(); if (patternLength>1 && pattern.endsWith("/")) { pattern = pattern.substring(0, patternLength-1); } List<Rule> list = cache.get(pattern); if (list == null) { list = new ArrayList<Rule>(); cache.put(pattern, list); } list.add(rule); rules.add(rule); if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } }
/** * Registers a new Rule instance matching the specified pattern. * This implementation sets the <code>Digester</code> and the * <code>namespaceURI</code> on the <code>Rule</code> before calling {@link #registerRule}. * * @param pattern Nesting pattern to be matched for this Rule * @param rule Rule instance to be registered */ public void add(String pattern, Rule rule) { // set up rule if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } registerRule(pattern, rule); }
/** * Registers a new Rule instance matching the specified pattern. * This implementation sets the <code>Digester</code> and the * <code>namespaceURI</code> on the <code>Rule</code> before calling {@link #registerRule}. * * @param pattern Nesting pattern to be matched for this Rule * @param rule Rule instance to be registered */ public void add(String pattern, Rule rule) { // set up rule if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } registerRule(pattern, rule); }
/** * Registers a new Rule instance matching the specified pattern. * This implementation sets the <code>Digester</code> and the * <code>namespaceURI</code> on the <code>Rule</code> before calling {@link #registerRule}. * * @param pattern Nesting pattern to be matched for this Rule * @param rule Rule instance to be registered */ public void add(String pattern, Rule rule) { // set up rule if (this.digester != null) { rule.setDigester(this.digester); } if (this.namespaceURI != null) { rule.setNamespaceURI(this.namespaceURI); } registerRule(pattern, rule); }
/** Adds a rule to be fired when wrapped implementation returns no matches */ public void addDefault(Rule rule) { // set up rule if (wrappedRules.getDigester() != null) { rule.setDigester(wrappedRules.getDigester()); } if (wrappedRules.getNamespaceURI() != null) { rule.setNamespaceURI(wrappedRules.getNamespaceURI()); } defaultRules.add(rule); allRules.add(rule); }
/** Adds a rule to be fired when wrapped implementation returns no matches */ public void addDefault(Rule rule) { // set up rule if (wrappedRules.getDigester() != null) { rule.setDigester(wrappedRules.getDigester()); } if (wrappedRules.getNamespaceURI() != null) { rule.setNamespaceURI(wrappedRules.getNamespaceURI()); } defaultRules.add(rule); allRules.add(rule); }
/** Adds a rule to be fired when wrapped implementation returns no matches */ public void addDefault(Rule rule) { // set up rule if (wrappedRules.getDigester() != null) { rule.setDigester(wrappedRules.getDigester()); } if (wrappedRules.getNamespaceURI() != null) { rule.setNamespaceURI(wrappedRules.getNamespaceURI()); } defaultRules.add(rule); allRules.add(rule); }
/** Adds a rule to be fired when wrapped implementation returns no matches */ public void addDefault(Rule rule) { // set up rule if (wrappedRules.getDigester() != null) { rule.setDigester(wrappedRules.getDigester()); } if (wrappedRules.getNamespaceURI() != null) { rule.setNamespaceURI(wrappedRules.getNamespaceURI()); } defaultRules.add(rule); allRules.add(rule); }
/** Adds a rule to be fired when wrapped implementation returns no matches */ public void addDefault(Rule rule) { // set up rule if (wrappedRules.getDigester() != null) { rule.setDigester(wrappedRules.getDigester()); } if (wrappedRules.getNamespaceURI() != null) { rule.setNamespaceURI(wrappedRules.getNamespaceURI()); } defaultRules.add(rule); allRules.add(rule); }