public class Contract
extends Object
Represents a contract between a supplier and a customer of a class.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public ClassInvariant |
classInvariant()Returns the current class invariant. |
|
public ClassNode |
classNode()Returns the class represented by this contract. |
|
public boolean |
hasDefaultClassInvariant()Indicates whether the contract still uses the shared default class invariant. |
|
public AssertionMap<Postcondition> |
postconditions()Returns the postconditions indexed by method. |
|
public AssertionMap<Precondition> |
preconditions()Returns the preconditions indexed by method. |
|
public void |
setClassInvariant(ClassInvariant classInvariant)Replaces the class invariant associated with this contract. |
Creates a contract model for the supplied class.
classNode - the class described by this contractReturns the current class invariant.
Returns the class represented by this contract.
Indicates whether the contract still uses the shared default class invariant.
true if no custom class invariant has been setReturns the postconditions indexed by method.
Returns the preconditions indexed by method.
Replaces the class invariant associated with this contract.
classInvariant - the invariant to storeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.