Annotation Interface TemplateData


@Target(TYPE) @Retention(RUNTIME) @Repeatable(Container.class) public @interface TemplateData

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

This annotation is used to mark a target type for which a value resolver should be automatically generated. Note that non-public members, constructors, static initializers, static, synthetic and void methods are always ignored.

If the namespace() is set to a non-empty value then a namespace resolver is automatically generated to access static fields and methos of the target class.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The regular expressions that are used to match the members that should be ignored.
    boolean
    If set to true do not automatically analyze superclasses.
    If set to a non-empty value then a namespace resolver is automatically generated to access static fields and methos of the target class.
    boolean
    If set to true include only properties: instance fields and methods without params.
    The class a value resolver should be generated for.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant value for namespace() indicating that the simple name of the target class should be used.
    static final String
    Constant value for namespace() indicating that the fully qualified class name of the target class should be used.
  • Field Details

    • UNDERSCORED_FQCN

      static final String UNDERSCORED_FQCN
      Constant value for namespace() indicating that the fully qualified class name of the target class should be used. Dots and dollar signs are replaced by underscores.
      See Also:
    • SIMPLENAME

      static final String SIMPLENAME
      Constant value for namespace() indicating that the simple name of the target class should be used.
      See Also:
  • Element Details

    • target

      Class<?> target
      The class a value resolver should be generated for. By default, the annotated type.
      Default:
      io.quarkus.qute.TemplateData.class
    • ignore

      String[] ignore
      The regular expressions that are used to match the members that should be ignored.
      Default:
      {}
    • ignoreSuperclasses

      boolean ignoreSuperclasses
      If set to true do not automatically analyze superclasses.
      Default:
      false
    • properties

      boolean properties
      If set to true include only properties: instance fields and methods without params.
      Default:
      false
    • namespace

      String namespace
      If set to a non-empty value then a namespace resolver is automatically generated to access static fields and methos of the target class.

      By default, the namespace is the FQCN of the target class where dots and dollar signs are replaced by underscores, for example the namespace for a class with name org.acme.Foo is org_acme_Foo.

      Note that a namespace can only consist of alphanumeric characters and underscores.

      Default:
      "<<undescored fqcn>>"