}
public RuleConditionElement build(final RuleBuildContext context,
final BaseDescr descr,
final Pattern prefixPattern) {
final ForallDescr forallDescr = (ForallDescr) descr;
final PatternBuilder patternBuilder = (PatternBuilder) context.getDialect().getBuilder( PatternDescr.class );
final Pattern basePattern = (Pattern) patternBuilder.build( context,
forallDescr.getBasePattern() );
if ( basePattern == null ) {
return null;
}
final Forall forall = new Forall( basePattern );
// adding the newly created forall CE to the build stack
// this is necessary in case of local declaration usage
context.getBuildStack().push( forall );
for ( final Iterator it = forallDescr.getRemainingPatterns().iterator(); it.hasNext(); ) {
final Pattern anotherPattern = (Pattern) patternBuilder.build( context,
(PatternDescr) it.next() );
forall.addRemainingPattern( anotherPattern );
}