Annotation Type 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.
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static String ELEMENT_NAME
      Constant value for name() indicating that the field/method name should be used.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String name  
    • Field Detail

      • ELEMENT_NAME

        static final String ELEMENT_NAME
        Constant value for name() indicating that the field/method name should be used.
    • Element Detail

      • name

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