org.jaffa.tools.patternengine
Class PatternGenerator

java.lang.Object
  extended byorg.jaffa.tools.patternengine.PatternGenerator

public class PatternGenerator
extends Object

Use this class to perform code generation based on the input pattern meta data file.


Constructor Summary
PatternGenerator(URL patternMetaData)
          Creates new PatternGenerator.
 
Method Summary
 void destroy()
          This method is to be invoked, when done with the code generation.
static void main(String[] args)
          This will create an instance of the PatternGenerator, passing the URL corresponding to the input argument.
 void processPattern()
          This will invoke the Pattern Generation routine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternGenerator

public PatternGenerator(URL patternMetaData)
                 throws PatternGeneratorException
Creates new PatternGenerator.

Parameters:
patternMetaData - the pattern meta data file to be used for code generation.
Throws:
PatternGeneratorException - if any error occurs.
Method Detail

destroy

public void destroy()
This method is to be invoked, when done with the code generation. It will free up the resources.


processPattern

public void processPattern()
                    throws PatternGeneratorException
This will invoke the Pattern Generation routine.

Throws:
PatternGeneratorException - if any error occurs.

main

public static void main(String[] args)
This will create an instance of the PatternGenerator, passing the URL corresponding to the input argument. It will then invoke the 'processPattern()' method. If the argument is a directory, then the above process will be invoked for each file in the directory. If the '-r' argument is passed, then it will recursively scan the directory for files, and invoke the pattern generation for each file.

Parameters:
args - This expects at least one argument to be passed in. This should represent the patternMetaData file, relative to the classpath. If a directory of passed, then the optional second argument determines, if a recursive search is to be performed on the directory.


Copyright © 2002-2004 JAFFA Project.