this.ifObj = ifObj;
}
@Override
public void beforeChildren(KernelState kernelState, Record record) throws RedirectException {
CheckResult result = ifObj.getCondition().check(
record, kernelState.getLastExecutionFrame().getVariables());
if (result.isPassed() && ifObj.getThenBranch() != null) {
throw new RedirectException(ifObj.getThenBranch().getFrameAddress(), false);
} else if (!result.isPassed() && ifObj.getElseBranch() != null) {
throw new RedirectException(ifObj.getElseBranch().getFrameAddress(), false);
} else {
throw new RedirectException(FrameAddress.RETURN, false);
}
}