@Test public void canReturnChildMatcher() { Matcher wrappedMatcher = new TestMatcher(true); NotMatcher notMatcher = new NotMatcher(); notMatcher.addChild(wrappedMatcher); assertSame("Should return child matcher.", wrappedMatcher, notMatcher.originalMatcher()); }
public Matcher originalMatcher() { Iterator<Matcher> childMatchers = childIterator(); if (childMatchers.hasNext()) { return childMatchers.next(); } else { throw new IllegalStateException("Tried to retrieve child matcher of empty NotMatcher"); } }
NotMatcher extends CompoundMatcher { public Matcher originalMatcher() { Iterator<Matcher> childMatchers = childIterator(); if (childMatchers.hasNext()) { return childMatchers.next(); } else { throw new IllegalStateException("Tried to retrieve child matcher of empty NotMatcher"); } } }
NotMatcher extends CompoundMatcher { public Matcher originalMatcher() { Iterator<Matcher> childMatchers = childIterator(); if (childMatchers.hasNext()) { return childMatchers.next(); } else { throw new IllegalStateException("Tried to retrieve child matcher of empty NotMatcher"); } }  }
NotMatcher extends CompoundMatcher { public Matcher originalMatcher() { Iterator<Matcher> childMatchers = childIterator(); if (childMatchers.hasNext()) { return childMatchers.next(); } else { throw new IllegalStateException("Tried to retrieve child matcher of empty NotMatcher"); } }  @Override boolean match(BugInstance bugInstance); @Override void writeXML(XMLOutput xmlOutput, boolean disabled); @Override String toString(); @Override int maxChildren(); Matcher originalMatcher(); }
NotMatcher extends CompoundMatcher { public Matcher originalMatcher() { Iterator<Matcher> childMatchers = childIterator(); if (childMatchers.hasNext()) { return childMatchers.next(); } else { throw new IllegalStateException("Tried to retrieve child matcher of empty NotMatcher"); } }  @Override boolean match(BugInstance bugInstance); @Override void writeXML(XMLOutput xmlOutput, boolean disabled); @Override String toString(); @Override int maxChildren(); Matcher originalMatcher();  }