Skip to content

Java library for checking contracts (preconditions, etc.)

Notifications You must be signed in to change notification settings

WPS/common-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPS common contracts

This project contains a set of contracts for design by contract. The contracts follow the following naming scheme:

  • Methods starting with require are preconditions, which are used to check arguments
  • Methods starting with check are state checks or invariants, which are used to check intermediate results for consistency
  • Methods starting with ensure are postconditions, which are used to check results before returning them

The contracts

The (static) methods implementing different contracts are grouped in the following classes:

Maven coordinates

Releases can be found in Maven central under the following coordinates:

<dependency>
    <groupId>de.wps.common</groupId>
    <artifactId>common-contracts</artifactId>
    <version>0.4</version>
</dependency>

If you do not want to get the (only) transitive dependency org.checkerframework:check-qual, you can exclude it:

<dependency>
    <groupId>de.wps.common</groupId>
    <artifactId>common-contracts</artifactId>
    <version>0.4</version>
    <exclusions>
        <exclusion>
            <groupId>org.checkerframework</groupId>
            <artifactId>checker-qual</artifactId>
        </exclusion>
    </exclusions>
</dependency>

About

Java library for checking contracts (preconditions, etc.)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages