com.ibm.workflow.util.fdl.make
Class Make

java.lang.Object
  |
  +--com.ibm.workflow.util.fdl.make.Make
Direct Known Subclasses:
DTD, XSD

public abstract class Make
extends java.lang.Object

Common base class for all generators operating on FDL parse trees. It deals with FDL parsing (using a com.ibm.workflow.util.fdl.Parser), configuration parsing (using a com.ibm.workflow.util.cfg.Parser), template handling and optional postprocessing (if a filter class is configured). Actual code generation is delegated to an instance implementing the com.ibm.workflow.util.fdl.ParserVisitor.

Version:
1.2
Author:
Robert Junghuber (junghub@de.ibm.com)

Field Summary
protected static java.lang.String eol
           
 
Constructor Summary
protected Make()
          Main entry point.
protected Make(java.lang.String[] args)
           
 
Method Summary
protected abstract  java.lang.String ext()
          File extension for generated output, used to locate configuration, too
protected  java.util.Hashtable getConfig()
          Returns the configuration data
protected  java.io.PrintWriter getPrintWriter()
          Returns the default output PrintWriter
protected  java.io.PrintWriter getPrintWriter(java.io.File file)
          PrintWriter Factory
protected  void make(java.lang.String arg)
           
protected abstract  java.lang.String name()
          Name of generator, used in reports
protected  void postGenerate(java.lang.String tgt)
           
protected abstract  java.lang.String tag()
          Tag string in skeleton file
protected abstract  java.lang.String usage()
          Explanation for command line parameters
protected abstract  java.lang.Class visitor()
          Class to be used as Visitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eol

protected static final java.lang.String eol
Constructor Detail

Make

protected Make()
Main entry point. args[0] specifies the name of the FDL file, args[1] is the (optional) name of the output file

Make

protected Make(java.lang.String[] args)
        throws java.lang.Exception
Method Detail

make

protected final void make(java.lang.String arg)
                   throws java.lang.Exception

postGenerate

protected void postGenerate(java.lang.String tgt)
                     throws java.lang.Exception

getPrintWriter

protected final java.io.PrintWriter getPrintWriter(java.io.File file)
                                            throws java.io.IOException
PrintWriter Factory

getPrintWriter

protected final java.io.PrintWriter getPrintWriter()
Returns the default output PrintWriter

getConfig

protected final java.util.Hashtable getConfig()
Returns the configuration data

visitor

protected abstract java.lang.Class visitor()
Class to be used as Visitor

ext

protected abstract java.lang.String ext()
File extension for generated output, used to locate configuration, too

tag

protected abstract java.lang.String tag()
Tag string in skeleton file

name

protected abstract java.lang.String name()
Name of generator, used in reports

usage

protected abstract java.lang.String usage()
Explanation for command line parameters