biz.hammurapi.codegen
Class XmlDocConsumer

java.lang.Object
  extended by biz.hammurapi.codegen.XmlDocConsumer
All Implemented Interfaces:
Consumer, DocumentingConsumer

public class XmlDocConsumer
extends java.lang.Object
implements DocumentingConsumer

Stores generated class files in a specified directory and creates HTML documenation.

Version:
$Revision: 1.4 $
Author:
Pavel Vlasov

Constructor Summary
XmlDocConsumer(java.io.File classDir, java.io.File docDir, java.lang.String indexName)
          Construcotor
 
Method Summary
 void close()
          Closes all files.
 void consume(org.apache.bcel.classfile.JavaClass javaClass)
          Writes file to disk and also adds it to documentation
 GenerationListener getListener()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDocConsumer

public XmlDocConsumer(java.io.File classDir,
                      java.io.File docDir,
                      java.lang.String indexName)
               throws GenerationException
Construcotor

Parameters:
classDir - Output directory for generated classes. Mandatory.
docDir - Output directory for HTML documentation. Optional (can be null).
indexName - Name of index file.
Throws:
GenerationException
Method Detail

consume

public void consume(org.apache.bcel.classfile.JavaClass javaClass)
             throws GenerationException
Writes file to disk and also adds it to documentation

Specified by:
consume in interface Consumer
Parameters:
javaClass - Class to save and document
Throws:
GenerationException - If generated file could not be saved

getListener

public GenerationListener getListener()
Specified by:
getListener in interface Consumer
Returns:
Generation listener which documents methods and classes

close

public void close()
Closes all files.

Specified by:
close in interface DocumentingConsumer


Copyright © 2003 Hammurapi Group. All Rights Reserved.