Package org.apache.groovy.contracts.domain

# Class Contract

java.lang.Object
org.apache.groovy.contracts.domain.Contract

public class Contract extends Object

Represents a contract between a supplier and a customer of a class.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Contract(ClassNode classNode)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ClassInvariant`
  `classInvariant()`
  `ClassNode`
  `classNode()`
  `boolean`
  `hasDefaultClassInvariant()`
  `AssertionMap<Postcondition>`
  `postconditions()`
  `AssertionMap<Precondition>`
  `preconditions()`
  `void`
  `setClassInvariant(ClassInvariant classInvariant)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Contract

    public Contract(ClassNode classNode)

- ## Method Details

  - ### classNode

    public ClassNode classNode()

  - ### setClassInvariant

    public void setClassInvariant(ClassInvariant classInvariant)

  - ### preconditions

    public AssertionMap<Precondition> preconditions()

  - ### postconditions

    public AssertionMap<Postcondition> postconditions()

  - ### hasDefaultClassInvariant

    public boolean hasDefaultClassInvariant()

  - ### classInvariant

    public ClassInvariant classInvariant()