/** * 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}", "<#list recentComments as comment>" * @return {@code true} if it exists, returns {@code false} otherwise */ public static boolean hasExpression(final Template template, final String expression) { final TemplateElement rootTreeNode = template.getRootTreeNode(); return hasExpression(template, expression, rootTreeNode); }
final TemplateElement nextElement = children.nextElement(); if (hasExpression(template, expression, nextElement)) { return true;
/** * 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}", "<#list recentComments as comment>" * @return {@code true} if it exists, returns {@code false} otherwise */ public static boolean hasExpression(final Template template, final String expression) { final TemplateElement rootTreeNode = template.getRootTreeNode(); return hasExpression(template, expression, rootTreeNode); }
final TemplateElement nextElement = children.nextElement(); if (hasExpression(template, expression, nextElement)) { return true;