Package io.quarkus.qute
Annotation Type TemplateExtension.TemplateAttribute
-
@Retention(RUNTIME) @Target(PARAMETER) public static @interface TemplateExtension.TemplateAttribute
Used to annotate a template extension method parameter that should be obtained viaTemplateInstance.getAttribute(String). The parameter type must beObject.@TemplateExtension static BigDecimal discountedPrice(Item item, @TemplateAttribute Object locale) { // this method matches {item.discountedPrice} // ... do some locale-aware formatting }
-
-
Field Summary
Fields Modifier and Type Fields Description static StringPARAMETER_NAMEConstant value forvalue()indicating that the name of the annotated parameter should be used as-is.
-
-
-
Element Detail
-
value
String value
- Returns:
- the key used to obtain the attribute
- See Also:
TemplateInstance.getAttribute(String)
- Default:
- "<<parameter name>>"
-
-