Package org.apache.velocity.util
Class StringUtils
java.lang.Object
org.apache.velocity.util.StringUtils
This class provides some methods for dynamically
invoking methods in objects, and some string
manipulation and formatting methods.
- Version:
- $Id$
- Author:
- Jason van Zyl, Daniel Rall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatFileString(String template, int linenum, int colnum) Simply creates a string that formats the template filename with line number and column.static StringformatFileString(Directive directive) Creates a string that formats the template filename with line number and column of the given Directive.static StringformatFileString(Node node) Creates a string that formats the template filename with line number and column of the given Node.static StringformatFileString(Info info) Simply creates a string that formats the template filename with line number and column.
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
formatFileString
Creates a string that formats the template filename with line number and column of the given Directive. We use this routine to provide a consistent format for displaying file errors.- Parameters:
directive- currrent directive- Returns:
- formatted string
-
formatFileString
Creates a string that formats the template filename with line number and column of the given Node. We use this routine to provide a consistent format for displaying file errors.- Parameters:
node- current node- Returns:
- formatted string
-
formatFileString
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.- Parameters:
info- template name, line and column infos- Returns:
- formatted string
-
formatFileString
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.- Parameters:
template- File name of template, can be nulllinenum- Line number within the filecolnum- Column number withing the file at linenum- Returns:
- formatted string
-