Java Doc for Utilities.java in  » Parser » Rats-Parser-Generators » xtc » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Parser » Rats Parser Generators » xtc.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   xtc.util.Utilities

Utilities
final public class Utilities (Code)
Implmentation of utilities for language processors, focusing on handling of I/O.
author:
   Robert Grimm
version:
   $Revision: 1.1 $


Field Summary
final public static  intC_ESCAPES
     The escape flags for C/C++ escapes.
final public static  intESCAPE_DOUBLE
     Flag for using doubled escape sequences.
final public static  intESCAPE_REGEX
     Flag for escaping the '[', '-', and ']' characters.
final public static  intESCAPE_UNICODE
     Flag for escaping non-printable ASCII characters using Unicode escapes.
final public static  intFULL_ESCAPES
     The escape flags for Java and regex escapes.
final public static  intJAVA_ESCAPES
     The escape flags for Java escapes.
final public static  PatternSPLIT
     The regular expression pattern used to split source code along newlines.


Method Summary
public static  voidescape(char c, StringBuffer buf, int flags)
     Escape the specified character into the specified string buffer.
public static  voidescape(String s, StringBuffer buf, int flags)
     Escape the specified string into the specified string buffer.
public static  Stringescape(char c, int flags)
     Escape the specified character.
Parameters:
  c - The character.
Parameters:
  flags - The escape flags.
public static  Stringescape(String s, int flags)
     Escape the specified string.
Parameters:
  s - The string.
Parameters:
  flags - The escape flags.
public static  Stringformat(List l)
     Convert the specified list to a human-readable representation. This method uses toString() for each element in the specified list to generate a human-readable representation.
Parameters:
  l - The list.
public static  voidmsg(String msg, Location loc, String[] source)
     Print the specified (error or warning) message to the error console.
public static  voidmsg(String msg, Location loc, String context, String[] source)
     Print the specified (error or warning) message to the error console.
public static  voidpump(Reader in, Writer out)
     Pump all data from the specified reader to the specified writer.
public static  StringtoDescription(String id)
     Convert the specified identifier into a human-readable description.
public static  Stringunescape(String s)
     Unescape the specified string.
public static  booleanuseDoubleEscapes(int flags)
     Determine whether the double escapes flag is set.
See Also:   Utilities.ESCAPE_DOUBLE
Parameters:
  flags - The escape flags.
public static  booleanuseRegexEscapes(int flags)
     Determine whether the regex escapes flag is set.
See Also:   Utilities.ESCAPE_REGEX
Parameters:
  flags - The escape flags.
public static  booleanuseUnicodeEscapes(int flags)
     Determine whether the Unicode escapes flag is set.
See Also:   Utilities.ESCAPE_UNICODE
Parameters:
  flags - The escape flags.

Field Detail
C_ESCAPES
final public static int C_ESCAPES(Code)
The escape flags for C/C++ escapes.



ESCAPE_DOUBLE
final public static int ESCAPE_DOUBLE(Code)
Flag for using doubled escape sequences. Doubled escape sequences will still read as an escape sequence, even if they are included in a program source character or string.



ESCAPE_REGEX
final public static int ESCAPE_REGEX(Code)
Flag for escaping the '[', '-', and ']' characters.



ESCAPE_UNICODE
final public static int ESCAPE_UNICODE(Code)
Flag for escaping non-printable ASCII characters using Unicode escapes.



FULL_ESCAPES
final public static int FULL_ESCAPES(Code)
The escape flags for Java and regex escapes.



JAVA_ESCAPES
final public static int JAVA_ESCAPES(Code)
The escape flags for Java escapes.



SPLIT
final public static Pattern SPLIT(Code)
The regular expression pattern used to split source code along newlines.





Method Detail
escape
public static void escape(char c, StringBuffer buf, int flags)(Code)
Escape the specified character into the specified string buffer.
Parameters:
  c - The character.
Parameters:
  buf - The string buffer.
Parameters:
  flags - The escape flags.



escape
public static void escape(String s, StringBuffer buf, int flags)(Code)
Escape the specified string into the specified string buffer.
Parameters:
  s - The string.
Parameters:
  buf - The string buffer.
Parameters:
  flags - The escape flags.



escape
public static String escape(char c, int flags)(Code)
Escape the specified character.
Parameters:
  c - The character.
Parameters:
  flags - The escape flags. The escape character as a string.



escape
public static String escape(String s, int flags)(Code)
Escape the specified string.
Parameters:
  s - The string.
Parameters:
  flags - The escape flags. The escaped string.



format
public static String format(List l)(Code)
Convert the specified list to a human-readable representation. This method uses toString() for each element in the specified list to generate a human-readable representation.
Parameters:
  l - The list. The human-readable representation.



msg
public static void msg(String msg, Location loc, String[] source)(Code)
Print the specified (error or warning) message to the error console. The message is prefixed with the specified location information and followed by the corresponding source line, with a caret ('^') indicating the column.
See Also:   Utilities.msg(String,Location,String,String[])
Parameters:
  msg - The message.
Parameters:
  loc - The source location.
Parameters:
  source - The source file, one line per array entry.



msg
public static void msg(String msg, Location loc, String context, String[] source)(Code)
Print the specified (error or warning) message to the error console. If the specified location is non-null, the message is prefixed with the location information. Otherwise, if the specified context is non-null, the message is prefixed with the context. If both the specified location and source are non-null, the message is followed by the corresponding source line and a caret ('^') to indicate the column.
Parameters:
  msg - The message.
Parameters:
  loc - The source location.
Parameters:
  context - The alternative context.
Parameters:
  source - The source file, one line per array entry.



pump
public static void pump(Reader in, Writer out) throws IOException(Code)
Pump all data from the specified reader to the specified writer.
Parameters:
  in - The reader.
Parameters:
  out - The writer.
throws:
  IOException - Signals an exceptinal condition during I/O.



toDescription
public static String toDescription(String id)(Code)
Convert the specified identifier into a human-readable description. This method breaks identifiers using an upper case character for each word component into a string of space separated lower case words.
Parameters:
  id - The identifier. The corresponding description.



unescape
public static String unescape(String s)(Code)
Unescape the specified string. This method unescapes standard C-style escapes ('\b', '\t', '\n', '\f', '\r', '\"', '\'', and '\\') as well as Java Unicode escapes. To support regex-like character classes, it also unescapes '\-', '\[', and '\]'.
Parameters:
  s - The string to unescape. The unescaped string.



useDoubleEscapes
public static boolean useDoubleEscapes(int flags)(Code)
Determine whether the double escapes flag is set.
See Also:   Utilities.ESCAPE_DOUBLE
Parameters:
  flags - The escape flags. true if the double escapes flag is set.



useRegexEscapes
public static boolean useRegexEscapes(int flags)(Code)
Determine whether the regex escapes flag is set.
See Also:   Utilities.ESCAPE_REGEX
Parameters:
  flags - The escape flags. true if the regex escape flag is set.



useUnicodeEscapes
public static boolean useUnicodeEscapes(int flags)(Code)
Determine whether the Unicode escapes flag is set.
See Also:   Utilities.ESCAPE_UNICODE
Parameters:
  flags - The escape flags. true if the Unicode escapes flag is set.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.