public abstract class Assertion<T extends Assertion>
extends Object
Base class for all assertion types.
T - the concrete assertion subtype used for logical composition| Constructor and description |
|---|
Assertion()Creates an assertion that defaults to true. |
Assertion(BlockStatement blockStatement, BooleanExpression booleanExpression)Creates an assertion backed by the original block and normalized boolean expression. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
and(T other)Conjoins this assertion with another assertion of the same kind. |
|
public BooleanExpression |
booleanExpression()Returns the boolean expression used when generating the runtime assertion. |
|
public void |
or(T other)Disjoins this assertion with another assertion of the same kind. |
|
public BlockStatement |
originalBlockStatement()Returns the original block statement from which this assertion was derived. |
|
public void |
renew(BooleanExpression booleanExpression)Replaces the current boolean expression while preserving the existing source mapping strategy. |
Creates an assertion that defaults to true.
Creates an assertion backed by the original block and normalized boolean expression.
blockStatement - the original contract block, or null if unavailablebooleanExpression - the normalized expression to evaluateConjoins this assertion with another assertion of the same kind.
other - the assertion to combine with a logical ANDReturns the boolean expression used when generating the runtime assertion.
Disjoins this assertion with another assertion of the same kind.
other - the assertion to combine with a logical ORReturns the original block statement from which this assertion was derived.
null if it is unavailableReplaces the current boolean expression while preserving the existing source mapping strategy.
booleanExpression - the new boolean expressionCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.