Declare CQLinq constraints in Java source code


CQL constraints of an JArchitect project are stored as raw text in the XML project file. CQL constraints can also be stored in Java source code. This facility is especially useful when a constraint implies a code element.

Jachitect provides the jar library JArchitectConstraints.jar which can be downloaded here.

This jar contains the following annotations to declare CQLinq queries in the source code:

  • CQLinqConstraint: To define a CQlinq query to be applied to a code element (package, class, method or field).
  • CQLinqConstraints:To define a set of CQlinq queries to be applied to a code element.