com.advancedpwr.record
Class ClassWriter
java.lang.Object
com.advancedpwr.record.ClassWriter
- Direct Known Subclasses:
- AbstractRecorder
public abstract class ClassWriter
- extends Object
ClassWriter wraps a PrintWriter with convenience methods for creating Java source code output.
- Author:
- Matthew Avery, mavery@advancedpwr.com on Mar 26, 2010
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPACE
public static final String SPACE
- See Also:
- Constant Field Values
PACKAGE
public static final String PACKAGE
- See Also:
- Constant Field Values
IMPORT
public static final String IMPORT
- See Also:
- Constant Field Values
CLASS
public static final String CLASS
- See Also:
- Constant Field Values
PUBLIC
public static final String PUBLIC
- See Also:
- Constant Field Values
PROTECTED
public static final String PROTECTED
- See Also:
- Constant Field Values
PRIVATE
public static final String PRIVATE
- See Also:
- Constant Field Values
fieldPrintWriter
protected PrintWriter fieldPrintWriter
tabDepth
protected int tabDepth
fieldDescriptor
protected ClassDescriptor fieldDescriptor
fieldObject
protected Object fieldObject
fieldSuperClass
protected Class fieldSuperClass
ClassWriter
public ClassWriter()
getObject
protected Object getObject()
setObject
protected void setObject(Object object)
getPrintWriter
public PrintWriter getPrintWriter()
setWriter
public void setWriter(Writer writer)
writeLine
public void writeLine(String inString)
write
public void write(String inString)
tab
protected ClassWriter tab()
tabs
protected ClassWriter tabs()
openBrace
public ClassWriter openBrace()
closeBrace
public ClassWriter closeBrace()
newLine
public ClassWriter newLine()
getDescriptor
public ClassDescriptor getDescriptor()
createDefaultDescriptor
protected abstract ClassDescriptor createDefaultDescriptor()
setDescriptor
public void setDescriptor(ClassDescriptor descriptor)
setClassName
public void setClassName(String inName)
- This method is a "short cut" to easily set the ClassDescriptor
- Parameters:
The - fully qualified class name
writeClassDeclaration
protected void writeClassDeclaration()
extendClass
protected String extendClass()
writePackage
protected void writePackage()
writeImports
protected void writeImports()
classes
protected abstract Set<Class> classes()
packageName
protected String packageName()
getClassName
public String getClassName()
getPackageName
public String getPackageName()
writeObject
protected void writeObject()
writeObjectBuilderMethod
protected abstract void writeObjectBuilderMethod()
getSuperClass
public Class getSuperClass()
setSuperClass
public void setSuperClass(Class superClass)
Copyright © 2011 Advanced Power Co. All Rights Reserved.