@Override public String toString() { if (numberChildren() == 1) { return super.toString(); } return "And(" + super.toString() + ")"; }
@Override public void removeChild(Matcher child) { enable(child);// Remove from disabled before removing it super.removeChild(child); }
@Override public boolean match(BugInstance bugInstance) { Iterator<Matcher> i = childIterator(); while (i.hasNext()) { Matcher child = i.next(); if (isEnabled(child) && child.match(bugInstance)) { return true; } } return false; }
@Override public boolean match(BugInstance bugInstance) { if(!childIterator().hasNext() ) { return false; } Matcher invertedMatcher = childIterator().next(); return ! invertedMatcher.match(bugInstance); }
@Override public boolean match(BugInstance bugInstance) { Iterator<Matcher> i = childIterator(); while (i.hasNext()) { Matcher child = i.next(); if (!child.match(bugInstance)) { return false; } } anyMatches = true; return true; }
@Override public boolean match(BugInstance bugInstance) { Iterator<Matcher> i = childIterator(); while (i.hasNext()) { Matcher child = i.next(); if (child.match(bugInstance)) { return true; } } return false; }
@Override public String toString() { if (numberChildren() == 1) { return super.toString(); } return "Or(" + super.toString() + ")"; }
public TypeMatcher(String descriptor, String role, String typeParameters) { this.descriptor = new NameMatch(descriptor); this.role = role; this.typeParameters = typeParameters; }
public static Filter parseFilter(String fileName) throws IOException { return new Filter(fileName); }
public static String createFieldSignature(String type) { if (type == null) { return null; } return typeToSignature(type); }
/** * Add if not present, but do not enable if already present and disabled * * @param child */ public void softAdd(Matcher child) { super.addChild(child); }
public void writeChildrenXML(XMLOutput xmlOutput) throws IOException { for (Matcher m : children) { m.writeXML(xmlOutput, false); } }
@Override public String toString() { return "Class(class=\"" + className.getValue() + "\")"; }
public boolean isEmpty() { return super.numberChildren() == 0; }
@Override public String toString() { return "Method(" + super.toString() + ")"; }
public ClassMatcher(String className, String role) { this.className = new NameMatch(className); this.role = role; }