} else if (array[i] == '.') { try { i = getMethodOrProperty(array, i, null, context); } catch (InvalidVelocityException e) { getLogger().debug("Not a valid method at char [" + i + "]", e); break; i = getTableElement(array, i, null, context); break; } else {
} else if (array[i] == '.') { try { i = getMethodOrProperty(array, i, null, context); } catch (InvalidVelocityException e) { LOGGER.debug("Not a valid method at char [{}]", i, e); i = getTableElement(array, i, null, context); break; } else {
i = getSimpleComment(array, currentIndex, velocityBlock, context); } else if (array[i + 1] == '*') { i = getMultilinesComment(array, currentIndex, velocityBlock, context); } else if (array[i + 1] == '{' || Character.isLetter(array[i + 1])) { i = getDirective(array, currentIndex, velocityBlock, context); } else { throw new InvalidVelocityException();
/** * Get any valid Velocity starting with a <code>$</code>. * * @param array the source to parse * @param currentIndex the current index in the <code>array</code> * @param velocityBlock the buffer where to append matched velocity block * @param context the parser context to put some informations * @return the index in the <code>array</code> after the matched block * @throws InvalidVelocityException not a valid velocity block */ public int getVar(char[] array, int currentIndex, StringBuffer velocityBlock, VelocityParserContext context) throws InvalidVelocityException { return getVar(array, currentIndex, null, velocityBlock, context); }
i = getDirectiveName(array, i, directiveNameBuffer, null, context); i = getMethodParameters(array, i, null, context); } else { throw new InvalidVelocityException(); i = getDirectiveEndOfLine(array, i, null, context);
VelocityParserContext context) throws InvalidVelocityException if (isVarEscaped(array, currentIndex)) { throw new InvalidVelocityException(); i = getVelocityIdentifier(array, i, varName, context); i = followVar(array, i, fullSyntax, context);
@Override public int getSimpleComment(char[] array, int currentIndex, StringBuffer velocityBlock, VelocityParserContext context) { ((ExtendedVelocityParserContext) context).setVelocity(true); ((ExtendedVelocityParserContext) context).setInline(true); return super.getSimpleComment(array, currentIndex, velocityBlock, context); }
@Override public int getMultilinesComment(char[] array, int currentIndex, StringBuffer velocityBlock, VelocityParserContext context) { ((ExtendedVelocityParserContext) context).setVelocity(true); ((ExtendedVelocityParserContext) context).setInline(true); return super.getMultilinesComment(array, currentIndex, velocityBlock, context); }
for (; i < array.length; ++i) { if (array[i] == '(') { i = getMethodParameters(array, i, null, context); break; } else if (!Character.isLetterOrDigit(array[i])) {
++depth; } else if (array[i] == '"' || array[i] == '\'') { i = getEscape(array, i, null, context); continue;
i = getSimpleComment(array, currentIndex, velocityBlock, context); } else if (array[i + 1] == '*') { i = getMultilinesComment(array, currentIndex, velocityBlock, context); } else if (array[i + 1] == '{' || Character.isLetter(array[i + 1])) { i = getDirective(array, currentIndex, velocityBlock, context); } else { throw new InvalidVelocityException();
/** * Get any valid Velocity starting with a <code>$</code>. * * @param array the source to parse * @param currentIndex the current index in the <code>array</code> * @param velocityBlock the buffer where to append matched velocity block * @param context the parser context to put some informations * @return the index in the <code>array</code> after the matched block * @throws InvalidVelocityException not a valid velocity block */ public int getVar(char[] array, int currentIndex, StringBuffer velocityBlock, VelocityParserContext context) throws InvalidVelocityException { return getVar(array, currentIndex, null, velocityBlock, context); }
i = getDirectiveName(array, i, directiveNameBuffer, null, context); i = getMethodParameters(array, i, null, context); } else { throw new InvalidVelocityException(); i = getDirectiveEndOfLine(array, i, null, context);
VelocityParserContext context) throws InvalidVelocityException if (isVarEscaped(array, currentIndex)) { throw new InvalidVelocityException(); i = getVelocityIdentifier(array, i, varName, context); i = followVar(array, i, fullSyntax, context);
for (; i < array.length; ++i) { if (array[i] == '(') { i = getMethodParameters(array, i, null, context); break; } else if (!Character.isLetterOrDigit(array[i])) {
++depth; } else if (array[i] == '"' || array[i] == '\'') { i = getEscape(array, i, null, context); continue;
} else if (array[i] == '$') { try { i = getVar(array, i, null, context); continue; } catch (InvalidVelocityException e) {