Contracts for Java (C4J
Contracts for Java (C4J) is a Contracts framework for Java 1.6 and later. The primary goal for C4J is ease of use. Contracts are about design and quality, aspects of programming that a lot programmers don't spend enough time and energy on.
Therefore a Contracts framework must be simple and painless to use. At the same time the framework must be powerful.
C4J is simple and powerful.
C4J-Eclipse-Plugin Feature List:
https://github.com/C4J-Team/C4J-Eclipse-Plugin
C4J-Website for general information:
http://c4j-team.github.io/C4J/
Your feedback is highly appreciated!
We are not going to try to convince any readers that Contracts are indeed a very powerful design and quality assurance technique, so if you are not already convinced of that, please follow the links above and you may be convinced to try this tool out! These are our favorites though:
- Contracts consist of preconditions and postconditions, which are systematically defined method by method.
- The class invariant ensures the DRY principle (Don't Repeat Yourself) for contracts by defining all those assertions, which must be fulfilled at any visible state of an object, only once.
- Contracts can be linked to classes and interfaces.
- Contracts are inherited by extending a class or by implementing an interface which is guarded by a contract.
- To be able to define meaningful contracts you are forced to split lengthy methods into small, well defined, methods with a single responsibility.
- As your contracts are checked at runtime, your classes are validated against the real usage of your application, not against some test cases that may not even be real use cases.
- If you are dealing with legacy code that you are afraid of refactoring, external contracts are perfect to add to existing code with no risk involved.
C4J-Eclipse-Plugin Feature List:
https://github.com/C4J-Team/C4J-Eclipse-Plugin
C4J-Website for general information:
http://c4j-team.github.io/C4J/
Categories: General Purpose Tools, Testing, Tools
Tags: contract, contracts, quality, Correctness, specification, runtime, legacy, Assertion, Precondition, Postcondition, Invariant, Design by Contract, java, vksi
Additional Details
Eclipse Versions: Mars (4.5), Luna (4.4), Kepler (4.3), Juno (4.2, 3.8), Previous to Juno (<=4.1), Neon (4.6), Oxygen (4.7), Photon (4.8), 2018-09 (4.9)
Platform Support: Windows, Mac
Organization Name: VKSI
Development Status: Production/Stable
Date Created: Friday, June 28, 2013 - 05:46
License: EPL
Date Updated: Monday, February 4, 2019 - 13:50
Submitted by: C4J VKSI
Date | Ranking | Installs | Clickthroughs |
---|---|---|---|
February 2025 | 0/0 | 0 | 10 |
January 2025 | 0/0 | 0 | 15 |
December 2024 | 587/654 | 2 | 5 |
November 2024 | 0/0 | 0 | 6 |
October 2024 | 638/663 | 1 | 6 |
September 2024 | 640/642 | 1 | 14 |
August 2024 | 0/0 | 0 | 16 |
July 2024 | 0/0 | 0 | 9 |
June 2024 | 595/681 | 2 | 13 |
May 2024 | 494/682 | 7 | 12 |
April 2024 | 543/687 | 5 | 12 |
March 2024 | 0/0 | 0 | 4 |