com.octagroup.foregej.java.tools
Class ToolRunner
java.lang.Object
|
+--com.octagroup.foregej.java.tools.ToolRunner
- public class ToolRunner
- extends java.lang.Object
This class is used to "run" the tools.
All we have to do is to pass a compilation unit to this class and all
the tools will be called.
Method Summary |
void |
addTool(java.lang.Class tool)
Adds a tool to the tool runner.
|
static ToolRunner |
getInstance()
Returns the singleton instance. |
void |
process(CompilationUnit cu)
This method processes a CompilationUnit
It creates a new instance of the registered tools and starts to
process the compilation unt with that tool.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ToolRunner
public ToolRunner()
getInstance
public static ToolRunner getInstance()
- Returns the singleton instance.
- Returns:
- the singleton instance.
addTool
public void addTool(java.lang.Class tool)
- Adds a tool to the tool runner.
When the process
metod is invoked a new instance of the
tool will be created.
- Parameters:
tool
-
process
public void process(CompilationUnit cu)
- This method processes a CompilationUnit
It creates a new instance of the registered tools and starts to
process the compilation unt with that tool.
- Parameters:
cu
- the CompilationUnit to process.
Copyright © 2003 El Icognito des Noboby. All Rights Reserved.