Class StringUtils


  • public class StringUtils
    extends java.lang.Object
    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 
      Constructor Description
      StringUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String formatFileString​(java.lang.String template, int linenum, int colnum)
      Simply creates a string that formats the template filename with line number and column.
      static java.lang.String formatFileString​(Directive directive)
      Creates a string that formats the template filename with line number and column of the given Directive.
      static java.lang.String formatFileString​(Node node)
      Creates a string that formats the template filename with line number and column of the given Node.
      static java.lang.String formatFileString​(Info info)
      Simply creates a string that formats the template filename with line number and column.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringUtils

        public StringUtils()
    • Method Detail

      • formatFileString

        public static java.lang.String formatFileString​(Directive directive)
        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

        public static java.lang.String formatFileString​(Node node)
        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

        public static java.lang.String formatFileString​(Info info)
        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

        public static java.lang.String formatFileString​(java.lang.String template,
                                                        int linenum,
                                                        int colnum)
        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 null
        linenum - Line number within the file
        colnum - Column number withing the file at linenum
        Returns:
        formatted string