Java Doc for Tool.java in  » Database-ORM » toplink » persistence » antlr » 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 » Database ORM » toplink » persistence.antlr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   persistence.antlr.Tool

Tool
public class Tool (Code)


Field Summary
 ToolErrorHandlererrorHandler
    
transient  Readerf
    
 booleangenDiagnostics
    
 booleangenDocBook
    
 booleangenHTML
    
protected  booleangenHashLines
    
protected  StringgrammarFile
    
protected  booleanhasError
    
protected static  StringliteralsPrefix
    
protected  NameSpacenameSpace
    
protected  StringnamespaceAntlr
    
protected  StringnamespaceStd
    
protected  booleannoConstructors
    
protected static  StringoutputDir
    
protected static  booleanupperCaseMangledLiterals
    
public static  Stringversion
    

Constructor Summary
public  Tool()
     Construct a new Tool.

Method Summary
protected  voidcheckForInvalidArguments(String[] args, BitSet cmdLineArgValid)
    
public  voidcopyFile(String source_name, String dest_name)
     This example is from the book _Java in a Nutshell_ by David Flanagan.
public  intdoEverything(String[] args)
     Process args and have ANTLR do it's stuff without calling System.exit. Just return the result code.
public  voiddoEverythingWrapper(String[] args)
     Perform processing on the grammar file.
public  voiderror(String s)
    
public  voiderror(String s, String file, int line, int column)
    
public  Objectfactory(String p)
     When we are 1.1 compatible...
public  voidfatalError(String message)
     An error occured that should stop the Tool from doing any work. The default implementation currently exits (via java.lang.System.exit(int) after printing an error message to stderr.
public  StringfileMinusPath(String f)
    
public  booleangetGenHashLines()
    
public  StringgetGrammarFile()
    
public  ReadergetGrammarReader()
    
public  StringgetLanguage(MakeGrammar behavior)
    
public  StringgetLiteralsPrefix()
    
public  NameSpacegetNameSpace()
    
public  StringgetNamespaceAntlr()
    
public  StringgetNamespaceStd()
    
public  StringgetOutputDirectory()
    
public  booleangetUpperCaseMangledLiterals()
    
public  booleanhasError()
    
public static  voidmain(String[] args)
    
public  PrintWriteropenOutputFile(String f)
     This method is used by all code generators to create new output files.
public  voidpanic()
     Issue an unknown fatal error.
public  voidpanic(String s)
     Issue a fatal error message.
public  Fileparent(File f)
    
public static  VectorparseSeparatedList(String list, char separator)
     Parse a list such as "f1.g;f2.g;..." and return a Vector of the elements.
public  StringpathToFile(String f)
     given a filename, strip off the directory prefix (if any) and return it.
protected  voidprocessArguments(String[] args)
    

Process the command-line arguments.

public  voidreportException(Exception e, String message)
    
public  voidreportProgress(String message)
    
public  voidsetArgOK(int i)
    
public  voidsetFileLineFormatter(FileLineFormatter formatter)
    
public  voidsetNameSpace(String name)
     Support C++ & C# namespaces (for now).
public  voidsetOutputDirectory(String o)
    
public  voidtoolError(String s)
    
public  voidwarning(String s)
    
public  voidwarning(String s, String file, int line, int column)
    
public  voidwarning(String[] s, String file, int line, int column)
    

Field Detail
errorHandler
ToolErrorHandler errorHandler(Code)
Object that handles analysis errors



f
transient Reader f(Code)



genDiagnostics
boolean genDiagnostics(Code)
Generate diagnostics? (vs code)



genDocBook
boolean genDocBook(Code)
Generate DocBook vs code?



genHTML
boolean genHTML(Code)
Generate HTML vs code?



genHashLines
protected boolean genHashLines(Code)



grammarFile
protected String grammarFile(Code)



hasError
protected boolean hasError(Code)
Was there an error during parsing or analysis?



literalsPrefix
protected static String literalsPrefix(Code)



nameSpace
protected NameSpace nameSpace(Code)
C++ file level options



namespaceAntlr
protected String namespaceAntlr(Code)



namespaceStd
protected String namespaceStd(Code)



noConstructors
protected boolean noConstructors(Code)



outputDir
protected static String outputDir(Code)
Current output directory for generated files



upperCaseMangledLiterals
protected static boolean upperCaseMangledLiterals(Code)



version
public static String version(Code)




Constructor Detail
Tool
public Tool()(Code)
Construct a new Tool.




Method Detail
checkForInvalidArguments
protected void checkForInvalidArguments(String[] args, BitSet cmdLineArgValid)(Code)



copyFile
public void copyFile(String source_name, String dest_name) throws IOException(Code)
This example is from the book _Java in a Nutshell_ by David Flanagan. Written by David Flanagan. Copyright (c) 1996 O'Reilly & Associates. You may study, use, modify, and distribute this example for any purpose. This example is provided WITHOUT WARRANTY either expressed or implied.



doEverything
public int doEverything(String[] args)(Code)
Process args and have ANTLR do it's stuff without calling System.exit. Just return the result code. Makes it easy for ANT build tool.



doEverythingWrapper
public void doEverythingWrapper(String[] args)(Code)
Perform processing on the grammar file. Can only be called from main() @param args The command-line arguments passed to main(). This wrapper does the System.exit for use with command-line.



error
public void error(String s)(Code)
Issue an error
Parameters:
  s - The message



error
public void error(String s, String file, int line, int column)(Code)
Issue an error with line number information
Parameters:
  s - The message
Parameters:
  file - The file that has the error (or null)
Parameters:
  line - The grammar file line number on which the error occured (or -1)
Parameters:
  column - The grammar file column number on which the error occured (or -1)



factory
public Object factory(String p)(Code)
When we are 1.1 compatible... public static Object factory2 (String p, Object[] initargs) { Class c; Object o = null; try { int argslen = initargs.length; Class cl[] = new Class[argslen]; for (int i=0;i<argslen;i++) { cl[i] = Class.forName(initargs[i].getClass().getName()); } c = Class.forName (p); Constructor con = c.getConstructor (cl); o = con.newInstance (initargs); } catch (Exception e) { System.err.println ("Can't make a " + p); } return o; }



fatalError
public void fatalError(String message)(Code)
An error occured that should stop the Tool from doing any work. The default implementation currently exits (via java.lang.System.exit(int) after printing an error message to stderr. However, the tools should expect that a subclass will override this to throw an unchecked exception such as java.lang.IllegalStateException or another subclass of java.lang.RuntimeException . If this method is overriden, it must never return normally; i.e. it must always throw an exception or call System.exit.
since:
   2.7.2
Parameters:
  s - The message



fileMinusPath
public String fileMinusPath(String f)(Code)



getGenHashLines
public boolean getGenHashLines()(Code)



getGrammarFile
public String getGrammarFile()(Code)



getGrammarReader
public Reader getGrammarReader()(Code)



getLanguage
public String getLanguage(MakeGrammar behavior)(Code)
Determine the language used for this run of ANTLR This was made a method so the subclass can override it



getLiteralsPrefix
public String getLiteralsPrefix()(Code)



getNameSpace
public NameSpace getNameSpace()(Code)



getNamespaceAntlr
public String getNamespaceAntlr()(Code)



getNamespaceStd
public String getNamespaceStd()(Code)



getOutputDirectory
public String getOutputDirectory()(Code)



getUpperCaseMangledLiterals
public boolean getUpperCaseMangledLiterals()(Code)



hasError
public boolean hasError()(Code)



main
public static void main(String[] args)(Code)



openOutputFile
public PrintWriter openOutputFile(String f) throws IOException(Code)
This method is used by all code generators to create new output files. If the outputDir set by -o is not present it will be created here.



panic
public void panic()(Code)
Issue an unknown fatal error. If this method is overriden, it must never return normally; i.e. it must always throw an exception or call System.exit. Tool.fatalError(String)



panic
public void panic(String s)(Code)
Issue a fatal error message. If this method is overriden, it must never return normally; i.e. it must always throw an exception or call System.exit. Tool.fatalError(String)
Parameters:
  s - The message



parent
public File parent(File f)(Code)



parseSeparatedList
public static Vector parseSeparatedList(String list, char separator)(Code)
Parse a list such as "f1.g;f2.g;..." and return a Vector of the elements.



pathToFile
public String pathToFile(String f)(Code)
given a filename, strip off the directory prefix (if any) and return it. Return "./" if f has no dir prefix.



processArguments
protected void processArguments(String[] args)(Code)

Process the command-line arguments. Can only be called by Tool. A bitset is collected of all correct arguments via setArgOk.


Parameters:
  args - The command-line arguments passed to main()



reportException
public void reportException(Exception e, String message)(Code)

since:
   2.7.2



reportProgress
public void reportProgress(String message)(Code)

since:
   2.7.2



setArgOK
public void setArgOK(int i)(Code)



setFileLineFormatter
public void setFileLineFormatter(FileLineFormatter formatter)(Code)



setNameSpace
public void setNameSpace(String name)(Code)
Support C++ & C# namespaces (for now). C++: Add a nested namespace name to the current namespace. C# : Specify an enclosing namespace for the generated code. DAW: David Wagner -- C# support by kunle odutola



setOutputDirectory
public void setOutputDirectory(String o)(Code)



toolError
public void toolError(String s)(Code)
Issue an error; used for general tool errors not for grammar stuff
Parameters:
  s - The message



warning
public void warning(String s)(Code)
Issue a warning
Parameters:
  s - the message



warning
public void warning(String s, String file, int line, int column)(Code)
Issue a warning with line number information
Parameters:
  s - The message
Parameters:
  file - The file that has the warning (or null)
Parameters:
  line - The grammar file line number on which the warning occured (or -1)
Parameters:
  column - The grammar file line number on which the warning occured (or -1)



warning
public void warning(String[] s, String file, int line, int column)(Code)
Issue a warning with line number information
Parameters:
  s - The lines of the message
Parameters:
  file - The file that has the warning
Parameters:
  line - The grammar file line number on which the warning occured



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.