Provides annotations that help you to enforce your design pattern rules by throwing errors at compilation time if needed.
Add dependency to maven pom.xml
<dependency> <groupId>org.checkdesignrules</groupId> <artifactId>checkdesignrules</artifactId> <version>0.1-SNAPSHOT</version> <scope>compile</scope> </dependency>
If it does not seems to work (no error when there should have) check that you do not have the compiler option -proc:none
Package annotation that permit you to deny some dependencies to some other packages.
To use it, create or modify a file named package-info.java
@CheckDependencies(deny = "com.model.*") package com.view.controller;import org.cdr.CheckDependencies;
Package annotation that requires every class of the package to implements Serializable.