* @return A new <code>PathExpression</code> with the given properties.
*/
private PathExpression createPathExpression(boolean twoFiltersInFirstMatcher,
boolean cumulativeSecondMatcher, boolean recursive) {
PathExpression pathExpression = new PathExpression();
MultipleDirectedRelationFinder finder;
PathMatcherTerm term;
finder = new MultipleDirectedRelationFinder();
finder.addRelation(MockRelation.CLASSFILE, true, false);
if (twoFiltersInFirstMatcher) {
finder.addRelation(MockRelation.DIRECTORY, true, false);
}
RelationshipSetAdapter setAdapter =
new RelationshipSetAdapter("Temporary", finder, relations);
term = new PathMatcherTerm(setAdapter, recursive, false);
pathExpression.addPathMatcher(term);
finder = new MultipleDirectedRelationFinder();
finder.addRelation(MockRelation.CLASS, true, false);
// cumulative!
setAdapter = new RelationshipSetAdapter("Temporary", finder, relations);
term = new PathMatcherTerm(setAdapter, recursive, cumulativeSecondMatcher);
pathExpression.addPathMatcher(term);
return pathExpression;