public static boolean hasExpression(final Template template, final String expression) {
        final TemplateElement rootTreeNode = template.getRootTreeNode();

        return hasExpression(template, expression, rootTreeNode);
    }
public static boolean hasExpression ( final Template template , final String expression ) { final TemplateElement rootTreeNode = template . getRootTreeNode ( ) ; return hasExpression ( template , expression , rootTreeNode ) ; }
Determines whether exists a variable specified by the given expression
in the specified template.

@param template   the specified template
@param expression the given expression, for example,
"${aVariable}", "&lt;#list recentComments as comment&gt;"
@return {@code true} if it exists, returns {@code false} otherwise