1. Home
  2. Docs
  3. Shared profile
  4. Annotations

Annotations

Jeyzer annotations are Java annotations to include in the applicative code.

Jeyzer annotations permit to create automatically the Jeyzer analysis patterns in the master and shared profiles, thanks to the Jeyzer build plugins for Maven and Gradle.

Jeyzer annotations

To include the Jeyzer annotations in your code, you must link with the Jeyzer annotations library.
Add the following dependency in your build :

<dependency>
  <groupId>org.jeyzer</groupId>
  <artifactId>jeyzer-annotations</artifactId>
  <version>2.1</version>
  <scope>compile</scope>
<dependency>

Jeyzer annotations is shipped as Java module.
Module name is : org.jeyzer.annotations
As it is required only at compilation time, any module should reference it in a static way : requires static org.jeyzer.annotations;

In general, if the method signature is self-explanatory, just put the annotation as is :

@Function 
private void storeInDatabase() { 
  ...

The analysis pattern will then do the automatic translation from <package>.<Class>.storeInDatabase to “Store in Database“.

However, if you prefer to make the analysis pattern more specific, use the name annotation attribute :

@Function(name="Basket content db storage")
private void storeInDatabase() { 
  ...

The following annotations can be used :

Check the Jeyzer demo source code for examples.

Jeyzer annotations is a Jeyzer Community project.

Annotation processing

At build time, the annotations must be compiled to generate the related analysis patterns.

Add the following dependency in your build :

<dependency>
  <groupId>org.jeyzer</groupId>
  <artifactId>jeyzer-annotation-processors</artifactId>
  <version>2.0</version>
  <scope>compile</scope>
</dependency>

This annotation processor will generate the new_pattern_entries.xml file in the generated-sources/jeyzer of your target build directory.
That file will then be processed by the Maven or Gradle profile updater plugin.

Jeyzer annotation processor is a Jeyzer Community project.