use of org.whole.lang.visitors.AbstractVisitor in project whole by wholeplatform.
the class GenericMatcherFactory method matchInScope.
public IVisitor matchInScope(final IEntity pattern) {
return new AbstractVisitor() {
public void visit(IEntity entity) {
if (!Matcher.match(pattern, entity, getBindings()))
throw new VisitException();
}
public void toString(StringBuilder sb) {
sb.append("match(");
// TODO startOf
sb.append(pattern);
sb.append(")");
}
};
}
Aggregations