Adding annotations

You can annotate the source code or add an external annotation file. This allows you, for example, to declare members as pure or impure functions, or exclude members from being verbalized.

To annotate your source code, you must declare a dependency to the annotations JAR file provided with Automation Decision Services. You can determine which version of the annotations JAR file to use by using the index.json file, as described in Deploying to a Maven repository.

To avoid conflicts when building the external library, the dependency should be declared as <scope>provided</scope>. The same requirement applies if you use Jackson annotations.

The updated POM file should look like the following example:

    <dependency>
      <groupId>com.ibm.decision</groupId>
      <artifactId>annotations</artifactId>
      <version>version from index.json</version>
      <scope>provided</scope>
    </dependency>