Annotation Interface TemplateContents


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

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

This annotation can be used to specify the contents for a type-safe template, i.e. for a method of a class annotated with CheckedTemplate or a Java record that implements TemplateInstance.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The contents.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The suffix is used to determine the content type of a template.
  • Element Details

    • value

      String value
      The contents.
    • suffix

      String suffix
      The suffix is used to determine the content type of a template. This is useful when working with template variants.

      By default, the txt value, which corresponds to text/plain, is used. For the text/html content type the html suffix should be used.

      Default:
      "txt"