org.ephman.abra.tools.plugins
Class PluginGeneratorHandler

java.lang.Object
  |
  +--org.ephman.abra.tools.plugins.PluginGeneratorHandler

public class PluginGeneratorHandler
extends java.lang.Object

this class will accept callbacks when parsing xml for information storage and generation calls to run friend to MapToJava

Version:
0.1 (8/16/2002)
Author:
Paul M Bethe

Constructor Summary
PluginGeneratorHandler()
           
 
Method Summary
 void addDefault(JClass currentClass)
          call each registered generator for the given class and allow them to add any default PluginData
 void close()
          At the end of the run allow each generator to close/release any resources or files
 void generate(JClass currentClass)
          call each registered generator for the given class
 void handleClassLevelNode(java.lang.String nodeName, java.util.Map attributes, JClass currentClass)
          call back when the node 'nodeName' which has been registered by this class is encountered
 void handleFieldLevelNode(java.lang.String nodeName, java.util.Map attributes, JClass currentClass, JField currentField)
          call back when the node 'nodeName' which has been registered by this class is encountered
 void registerGenerator(Generator generator)
          before maptoJava works on an XML Doc -> register custom generators here so that later calls to handle{Class,Field}, or generate will include then
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginGeneratorHandler

public PluginGeneratorHandler()
Method Detail

handleClassLevelNode

public void handleClassLevelNode(java.lang.String nodeName,
                                 java.util.Map attributes,
                                 JClass currentClass)
                          throws SchemaException
call back when the node 'nodeName' which has been registered by this class is encountered

Parameters:
nodeName - the node name ie "class-view"
attributes - all the attributes in the xml node in key-value hmap
currentClass - the JClass on which this node occured
Throws:
SchemaException - if the data is invalid.

handleFieldLevelNode

public void handleFieldLevelNode(java.lang.String nodeName,
                                 java.util.Map attributes,
                                 JClass currentClass,
                                 JField currentField)
                          throws SchemaException
call back when the node 'nodeName' which has been registered by this class is encountered

Parameters:
nodeName - the node name ie "view"
attributes - all the attributes in the xml node in key-value hmap
currentClass - the JClass on which this node occured
currentField - the JField on which this node occured
Throws:
SchemaException - if the data is invalid.

addDefault

public void addDefault(JClass currentClass)
                throws SchemaException
call each registered generator for the given class and allow them to add any default PluginData

Parameters:
currentClass - the class which should be passed to each registered generator
SchemaException

generate

public void generate(JClass currentClass)
              throws java.io.IOException,
                     SchemaException
call each registered generator for the given class

Parameters:
currentClass - the class which should be passed to each registered generator
java.io.IOException
SchemaException

close

public void close()
           throws java.io.IOException
At the end of the run allow each generator to close/release any resources or files

java.io.IOException

registerGenerator

public void registerGenerator(Generator generator)
before maptoJava works on an XML Doc -> register custom generators here so that later calls to handle{Class,Field}, or generate will include then