com.advancedpwr.record
Class AbstractRecorder
java.lang.Object
com.advancedpwr.record.ClassWriter
com.advancedpwr.record.AbstractRecorder
- All Implemented Interfaces:
- ObjectRecorder
- Direct Known Subclasses:
- BeanRecorder, XstreamRecorder
public abstract class AbstractRecorder
- extends ClassWriter
- implements ObjectRecorder
AbstractRecorder is the common base class for recorders. This class provides
some convenience methods for specifying the output directory for recorded classes. It also
provides the default ClassDescriptor for the superclass ClassWriter.
It is not necessary for future class recorders to extend AbstractRecorder. This abstract class
exists for convenience only.
- Author:
- Matthew Avery, mavery@advancedpwr.com on Sep 30, 2010
| Fields inherited from class com.advancedpwr.record.ClassWriter |
CLASS, fieldDescriptor, fieldObject, fieldPrintWriter, fieldSuperClass, IMPORT, PACKAGE, PRIVATE, PROTECTED, PUBLIC, SPACE, tabDepth |
| Methods inherited from class com.advancedpwr.record.ClassWriter |
classes, closeBrace, extendClass, getClassName, getDescriptor, getObject, getPackageName, getPrintWriter, getSuperClass, newLine, openBrace, packageName, setClassName, setDescriptor, setObject, setSuperClass, setWriter, tab, tabs, write, writeClassDeclaration, writeImports, writeLine, writeObject, writeObjectBuilderMethod, writePackage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fieldDestinationDirectory
protected File fieldDestinationDirectory
fieldJavaFileWriter
protected FileWriter fieldJavaFileWriter
AbstractRecorder
public AbstractRecorder()
createFileWriter
protected FileWriter createFileWriter(File inFile)
getJavaFileWriter
protected FileWriter getJavaFileWriter()
parentDirectory
protected File parentDirectory()
javaFile
protected File javaFile()
packagePath
protected String packagePath()
getDestination
public File getDestination()
setDestination
public void setDestination(File testDirectory)
- Set the generated output directory as a
File
- Parameters:
directory -
setDestination
public void setDestination(String inFileName)
- Set the generated output directory as the name of a
File.
- Parameters:
directory -
createDefaultDescriptor
protected ClassDescriptor createDefaultDescriptor()
- Specified by:
createDefaultDescriptor in class ClassWriter
objectClass
protected Class objectClass()
close
protected void close(Writer inWriter)
Copyright © 2011 Advanced Power Co. All Rights Reserved.