Annotation Interface TemplateGlobal


@Target({TYPE,FIELD,METHOD}) @Retention(RUNTIME) public @interface TemplateGlobal

IMPORTANT: This annotation only works in a fully integrated environment; such as a Quarkus application.

Denotes static fields and methods that supply global variables which are accessible in every template.

If a class is annotated with TemplateGlobal then every non-void non-private static method that declares no parameters and every non-private static field is considered a global variable. The name is defaulted, i.e. the name of the field/method is used.

A global variable method:

  • must not be private,
  • must be static,
  • must not accept any parameter,
  • must not return void.

A global variable field:

  • must not be private,
  • must be static.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant value for name() indicating that the field/method name should be used.
  • Field Details

  • Element Details

    • name

      String name
      Default:
      "<<element name>>"