An open API service indexing awesome lists of open source software.

https://github.com/klappdev/snitch

Java contract library based on AspectJ
https://github.com/klappdev/snitch

aspectj contracts-programming java

Last synced: 5 months ago
JSON representation

Java contract library based on AspectJ

Awesome Lists containing this project

README

          

# Snitch

This is simple Java contract library based on AspectJ.

Library can make compare operations with primitive type and
check objects for null.

There are three type annotation which use for checking.

@Expects - check parameters method
@Ensures - check return value method
@Invariant - check fields class

Developer can check input parameters method.

![alt text](https://raw.githubusercontent.com/klappdev/snitch/master/res/Expects.png)

Developer can check return value method. For return variable use reserved word result.

![alt text](https://raw.githubusercontent.com/klappdev/snitch/master/res/Ensures.png)

Developer also can check value fields class.

![alt text](https://raw.githubusercontent.com/klappdev/snitch/master/res/Invariant.png)

Support syntax highlight for string contract annotations in IntelliJ Idea

through language injection.

In future expects add check call method objects and Eclipse IDE highlight syntax plugins.

Requirements:

JDK: Java 8

libs: AspectJ