Skip to content

toolisticon/annotation-constraints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Annotation Constraints Annotation Processor

Maven Central Build Status codecov

This is a tech demo about providing and validating constraints on annotations. There are two possible ways to achieve this:

  • Placing constraint annotations on your annotation types or attributes
  • Creating a digital twin annotation to define constraints on 3rd party annotations.

The project provides an annotation processor that is applied on all annotation types checking for existing constraints. Then it picks up the corresponding constraint implementation via an SPI and tests it. It trigger compiler errors in case of broken constraints...

License

This project is released under the revised MIT License.

This project includes and repackages the Annotation-Processor-Toolkit released under the MIT License.