package org.glassfish.pfl.dynamic.codegen.impl;
import org.glassfish.pfl.dynamic.codegen.spi.Expression;
public final class IfStatement extends StatementBase {
private Expression condition ;
private BlockStatement truePart ;
private BlockStatement falsePart ;
IfStatement( Node parent, Expression expr ) {
super( parent ) ;
condition = expr ;
truePart = new BlockStatement( this ) ;
falsePart = new BlockStatement( this ) ;
}
public Expression condition() {
return condition ;
}
public BlockStatement truePart() {
return this.truePart ;
}
public BlockStatement falsePart() {
return this.falsePart ;
}
public void accept( Visitor visitor ) {
visitor.visitIfStatement( this ) ;
}
}