@Target(value=TYPE) @Retention(value=RUNTIME) public static @interface XTemplates.TemplateCondition
Defines a single method on an object that should be accessible from within XTemplate conditional statements.
By default, Object.equals(Object)
is defined as :equals in an XTemplate, so this is
legal:
interface TemplateUsingEquals extends XTemplates {
@XTemplate("<tpl if='o1:equals(o2)'>true</tpl>")
SafeHtml tpl(Object o1, Object o2);
}
Modifier and Type | Required Element and Description |
---|---|
String |
methodName
The name of the method to invoke from a compiled template.
|
Class<?> |
type |
public abstract Class<?> type
public abstract String name
methodName()
.methodName()
Copyright © 2018. All rights reserved.