/** * Helper method to log a warning when a deprecation has been found. * * @param deprecationType the type of deprecation (eg "getter", "setter", "method") * @param object the object that has a deprecation * @param methodName the deprecated method's name * @param info a Velocity {@link org.apache.velocity.util.introspection.Info} object containing information about * where the deprecation was located in the Velocity template file */ private void logWarning(String deprecationType, Object object, String methodName, Info info) { this.log.warn("Deprecated usage of {} [{}] in {}@{},{}", deprecationType, object.getClass() .getCanonicalName() + "." + methodName, info.getTemplateName(), info.getLine(), info.getColumn()); } }
public InvalidReferenceInfo(String invalidReference, Info info) { super(info.getTemplateName(),info.getLine(),info.getColumn()); this.invalidReference = invalidReference; }
public InvalidReferenceInfo(String invalidReference, Info info) { super(info.getTemplateName(),info.getLine(),info.getColumn()); this.invalidReference = invalidReference; }
/***********************************************************************/ public static String getInfoText(Info i) { return " at [" + i.getLine() + "," + i.getColumn() + "]" + " in template " + i.getTemplateName(); } public Info getInfo()
public InvalidReferenceInfo(String invalidReference, Info info) { super(info.getTemplateName(),info.getLine(),info.getColumn()); this.invalidReference = invalidReference; }
/** * Create a ParseErrorRuntimeException with the given message and info * * @param exceptionMessage the error exception message * @param info an Info object with the current template info * @since 1.5 */ public ParseErrorException(String exceptionMessage, Info info) { super(exceptionMessage); columnNumber = info.getColumn(); lineNumber = info.getLine(); templateName = info.getTemplateName(); }
/** * Create a ParseErrorRuntimeException with the given message and info * * @param exceptionMessage the error exception message * @param info an Info object with the current template info * @since 1.5 */ public ParseErrorException(String exceptionMessage, Info info) { super(exceptionMessage); columnNumber = info.getColumn(); lineNumber = info.getLine(); templateName = info.getTemplateName(); }
/** * Helper method to log a warning when a deprecation has been found. * * @param deprecationType the type of deprecation (eg "getter", "setter", "method") * @param object the object that has a deprecation * @param methodName the deprecated method's name * @param info a Velocity {@link org.apache.velocity.util.introspection.Info} object containing information about * where the deprecation was located in the Velocity template file */ private void logWarning(String deprecationType, Object object, String methodName, Info info) { this.log.warn(String.format("Deprecated usage of %s [%s] in %s@%d,%d", deprecationType, object.getClass() .getCanonicalName() + "." + methodName, info.getTemplateName(), info.getLine(), info.getColumn())); } }
/** * Helper method to log a warning when a deprecation has been found. * * @param deprecationType the type of deprecation (eg "getter", "setter", "method") * @param object the object that has a deprecation * @param methodName the deprecated method's name * @param info a Velocity {@link org.apache.velocity.util.introspection.Info} object containing * information about where the deprecation was located in the Velocity template file */ private void logWarning(String deprecationType, Object object, String methodName, Info info) { log.warn(String.format("Deprecated usage of %s [%s] in %s@%d,%d", deprecationType, object .getClass().getCanonicalName() + "." + methodName, info.getTemplateName(), info.getLine(), info.getColumn())); } }
/** * Create a ParseErrorRuntimeException with the given message and info * * @param exceptionMessage the error exception message * @param info an Info object with the current template info * @since 1.5 */ public ParseErrorException(String exceptionMessage, Info info) { super(exceptionMessage); columnNumber = info.getColumn(); lineNumber = info.getLine(); templateName = info.getTemplateName(); }
/** * Create a ParseErrorRuntimeException with the given message and info * * @param exceptionMessage the error exception message * @param info an Info object with the current template info * @param invalidSyntax the invalid syntax or reference triggering this exception * @since 1.5 */ public ParseErrorException(String exceptionMessage, Info info, String invalidSyntax) { super(exceptionMessage); columnNumber = info.getColumn(); lineNumber = info.getLine(); templateName = info.getTemplateName(); this.invalidSyntax = invalidSyntax; }
/** * Create a ParseErrorRuntimeException with the given message and info * * @param exceptionMessage the error exception message * @param info an Info object with the current template info * @param invalidSyntax the invalid syntax or reference triggering this exception * @since 1.5 */ public ParseErrorException(String exceptionMessage, Info info, String invalidSyntax) { super(exceptionMessage); columnNumber = info.getColumn(); lineNumber = info.getLine(); templateName = info.getTemplateName(); this.invalidSyntax = invalidSyntax; }
/** * Create a ParseErrorRuntimeException with the given message and info * * @param exceptionMessage the error exception message * @param info an Info object with the current template info * @param invalidSyntax the invalid syntax or reference triggering this exception * @since 1.5 */ public ParseErrorException(String exceptionMessage, Info info, String invalidSyntax) { super(exceptionMessage); columnNumber = info.getColumn(); lineNumber = info.getLine(); templateName = info.getTemplateName(); this.invalidSyntax = invalidSyntax; }
/** * Formats a textual representation of this object as <code>SOURCE * [line X, column Y]</code>. * * @return String representing this object. * @since 1.5 */ public String toString() { return StringUtils.formatFileString(getTemplateName(), getLine(), getColumn()); } }
/** * Simply creates a string that formats the template filename with line number * and column. We use this routine to provide a cosistent format for displaying * file errors. */ public static final String formatFileString(Info info) { return formatFileString(info.getTemplateName(), info.getLine(), info.getColumn()); }
/** * Formats a textual representation of this object as <code>SOURCE * [line X, column Y]</code>. * * @return String representing this object. * @since 1.5 */ public String toString() { return Log.formatFileString(getTemplateName(), getLine(), getColumn()); } }
/** * Simply creates a string that formats the template filename with line number * and column. We use this routine to provide a consistent format for displaying * file errors. */ public static String formatFileString(Info info) { return formatFileString(info.getTemplateName(), info.getLine(), info.getColumn()); }
/** * Formats a textual representation of this object as <code>SOURCE * [line X, column Y]</code>. * * @return String representing this object. * @since 1.5 */ public String toString() { return Log.formatFileString(getTemplateName(), getLine(), getColumn()); } }
/** * Simply creates a string that formats the template filename with line number * and column. We use this routine to provide a cosistent format for displaying * file errors. */ public static final String formatFileString(Info info) { return formatFileString(info.getTemplateName(), info.getLine(), info.getColumn()); }
throw new MethodInvocationException("Variable $" + variable + " has not been set", null, identifier, uberInfo.getTemplateName(), uberInfo.getLine(), uberInfo.getColumn());