public static final class BlockContractRule.ValidityProgramConstructor extends Object
Modifier and Type | Field and Description |
---|---|
private StatementBlock |
block |
private ProgramVariable |
exceptionParameter |
private Iterable<Label> |
labels |
private Services |
services |
private List<Statement> |
statements |
private BlockContract.Variables |
variables |
Constructor and Description |
---|
BlockContractRule.ValidityProgramConstructor(Iterable<Label> labels,
StatementBlock block,
BlockContract.Variables variables,
ProgramVariable exceptionParameter,
Services services) |
Modifier and Type | Method and Description |
---|---|
StatementBlock |
construct() |
private void |
declareExceptionNull() |
private void |
declareFlagFalse(ProgramVariable flag) |
private void |
declareFlagsFalse() |
private void |
declareFlagsFalse(Collection<ProgramVariable> flags) |
private void |
declareResultDefault() |
private void |
executeBlockSafely() |
private Statement |
label(StatementBlock block,
Iterable<Label> labels) |
private boolean |
occursReturnAndIsReturnTypeNotVoid() |
private StatementBlock |
replaceOuterBreaksContinuesAndReturns(StatementBlock block,
Label breakOutLabel) |
private Statement |
wrapInTryCatch(Statement labeldBlock,
ProgramVariable exceptionParameter) |
private final StatementBlock block
private final BlockContract.Variables variables
private final Services services
private final ProgramVariable exceptionParameter
public BlockContractRule.ValidityProgramConstructor(Iterable<Label> labels, StatementBlock block, BlockContract.Variables variables, ProgramVariable exceptionParameter, Services services)
public StatementBlock construct()
private void declareFlagsFalse()
private void declareFlagsFalse(Collection<ProgramVariable> flags)
private void declareFlagFalse(ProgramVariable flag)
private void declareResultDefault()
private boolean occursReturnAndIsReturnTypeNotVoid()
private void declareExceptionNull()
private void executeBlockSafely()
private Statement label(StatementBlock block, Iterable<Label> labels)
private StatementBlock replaceOuterBreaksContinuesAndReturns(StatementBlock block, Label breakOutLabel)
private Statement wrapInTryCatch(Statement labeldBlock, ProgramVariable exceptionParameter)