/** * Get or create a matcher child node. * @param subtype The event string for the child matcher. * @return The child matcher. */ protected MatcherNode getOrCreateMatcherNode(String subtype) { MatcherNode node = getChild(subtype); if(node==null) { node = new MatcherNode(); putChild(subtype, node); } return node; }
/** * Get the rules for an event type at level i. * @param type The event type. * @param i The level. */ protected void getRules(EventType type, int i, List<IRule<?>> ret) { String[] subtypes = type.getTypes(); if(i+1==subtypes.length) { List<IRule<?>> tmp = internalGetRules(subtypes[i]); if(tmp!=null) ret.addAll(tmp); } else { MatcherNode node = getChild(subtypes[i]); if(node!=null) node.getRules(type, i+1, ret); } List<IRule<?>> tmp = internalGetRules("*"); if(tmp!=null) ret.addAll(tmp); }