org.sourceforge.jemm.weaver.io
Class FileWriter

java.lang.Object
  extended by org.sourceforge.jemm.weaver.io.FileWriter
All Implemented Interfaces:
ClassWriter

public class FileWriter
extends java.lang.Object
implements ClassWriter

FileWriter is a ClassWriter that outputs to a directory structure. com.foo.Bar would be written to $basedir/com/foo/Bar.class

Author:
Paul Keeble

Constructor Summary
FileWriter(java.io.File baseDirectory)
          Constructs a FileWriter with the given base output directory.
 
Method Summary
 void writeClass(java.lang.String className, byte[] clazz)
          Writes the class to the underlying system of storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileWriter

public FileWriter(java.io.File baseDirectory)
Constructs a FileWriter with the given base output directory.

Parameters:
baseDirectory - The base output directory.
Method Detail

writeClass

public void writeClass(java.lang.String className,
                       byte[] clazz)
                throws java.io.IOException
Description copied from interface: ClassWriter
Writes the class to the underlying system of storage.

Specified by:
writeClass in interface ClassWriter
Parameters:
className - Fully qualified file name - eg com/package/Name.class
clazz - The bytes representing the class byte codes.
Throws:
java.io.IOException - When the base path can't be found or a problem was found in writing


Copyright © 2009. All Rights Reserved.