wt.tools.generation.language
Class JavaSourceWriter

java.lang.Object
  extended bywt.tools.generation.language.MergableWriter
      extended bywt.tools.generation.language.ClassWriter
          extended bywt.tools.generation.language.SourceWriter
              extended bywt.tools.generation.language.JavaSourceWriter

public class JavaSourceWriter
extends SourceWriter


Field Summary
private static String FILE_EXTENSION
           
private static String last_merge_file
           
private  JavaMethodGenerator methodGenerator
           
private static Hashtable writerCache
           
 
Fields inherited from class wt.tools.generation.language.ClassWriter
fileName, sourceClass
 
Fields inherited from class wt.tools.generation.language.MergableWriter
merging, out, preservable, preservedSections, preservesRead, writer
 
Constructor Summary
protected JavaSourceWriter(ClassClass source)
           
protected JavaSourceWriter(String file_name)
           
 
Method Summary
protected  String attributeModifiers(Attribute member)
           
protected  String classModifiers()
           
protected  String commentString()
           
protected  String fileExtension()
           
static JavaSourceWriter get(ClassClass source, WriteMode writeMode, JavaMethodGenerator methodGen)
           
static JavaSourceWriter get(String file_name)
           
private static JavaSourceWriter get(String file_name, boolean create)
           
private  String getDocumentation(ModelElement element, int portion)
           
protected  boolean hasSupportedMembers()
           
protected  String inheritance()
           
private  boolean isDeprecated(ClassMember source)
           
private  boolean isSupportedAPI(ClassMember source)
           
protected  String javaVisibility(Visibility theAccess)
           
protected  String memberModifiers(ClassMember member)
           
protected  String operationModifiers(Operation member)
           
protected  void quickWriteProxy()
           
protected  boolean writeAttributes()
           
protected  boolean writeAttributes(Enumeration e, boolean beforeInit)
           
protected  boolean writeBodyBegin()
           
protected  boolean writeBodyEnd()
           
protected  boolean writeCopyright()
           
protected  boolean writeDocumentation()
           
protected  boolean writeDocumentation(Attribute source)
           
protected  boolean writeDocumentation(Operation source)
           
protected  boolean writeHeader()
           
protected  boolean writeLines(String indent, String theString, int lineLen, boolean started)
           
protected  boolean writeMethodBody(Operation member)
           
protected  boolean writeNestedClasses()
           
protected  boolean writeOperations()
           
protected  boolean writeStaticInit()
           
protected  void writeVersionUids()
           
 
Methods inherited from class wt.tools.generation.language.SourceWriter
writeBody
 
Methods inherited from class wt.tools.generation.language.ClassWriter
fileName, fileName, fileName, getPreserves, markerBegin, markerEnd, write, write
 
Methods inherited from class wt.tools.generation.language.MergableWriter
gatherPreserves, getPreserves, getWriterFile, markerBegin, markerBegin, markerBeginPreserved, markerEnd, markerEnd, markerEndKeyed, printLines, putPreserves, setOut, tab, writeFooter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodGenerator

private JavaMethodGenerator methodGenerator

writerCache

private static Hashtable writerCache

FILE_EXTENSION

private static final String FILE_EXTENSION
See Also:
Constant Field Values

last_merge_file

private static String last_merge_file
Constructor Detail

JavaSourceWriter

protected JavaSourceWriter(ClassClass source)

JavaSourceWriter

protected JavaSourceWriter(String file_name)
Method Detail

attributeModifiers

protected String attributeModifiers(Attribute member)

classModifiers

protected String classModifiers()

commentString

protected String commentString()
Specified by:
commentString in class MergableWriter

fileExtension

protected String fileExtension()
Specified by:
fileExtension in class ClassWriter

get

public static JavaSourceWriter get(ClassClass source,
                                   WriteMode writeMode,
                                   JavaMethodGenerator methodGen)

get

public static JavaSourceWriter get(String file_name)

get

private static JavaSourceWriter get(String file_name,
                                    boolean create)

getDocumentation

private String getDocumentation(ModelElement element,
                                int portion)

hasSupportedMembers

protected boolean hasSupportedMembers()

inheritance

protected String inheritance()

isSupportedAPI

private boolean isSupportedAPI(ClassMember source)

isDeprecated

private boolean isDeprecated(ClassMember source)

javaVisibility

protected final String javaVisibility(Visibility theAccess)

memberModifiers

protected String memberModifiers(ClassMember member)

operationModifiers

protected String operationModifiers(Operation member)

quickWriteProxy

protected void quickWriteProxy()

writeVersionUids

protected void writeVersionUids()

writeAttributes

protected boolean writeAttributes()
Overrides:
writeAttributes in class SourceWriter

writeAttributes

protected boolean writeAttributes(Enumeration e,
                                  boolean beforeInit)

writeBodyBegin

protected boolean writeBodyBegin()
Overrides:
writeBodyBegin in class MergableWriter

writeBodyEnd

protected boolean writeBodyEnd()
Overrides:
writeBodyEnd in class MergableWriter

writeCopyright

protected boolean writeCopyright()

writeDocumentation

protected boolean writeDocumentation()

writeDocumentation

protected boolean writeDocumentation(Attribute source)

writeDocumentation

protected boolean writeDocumentation(Operation source)

writeHeader

protected boolean writeHeader()
Overrides:
writeHeader in class MergableWriter

writeLines

protected boolean writeLines(String indent,
                             String theString,
                             int lineLen,
                             boolean started)

writeMethodBody

protected boolean writeMethodBody(Operation member)

writeNestedClasses

protected boolean writeNestedClasses()
Overrides:
writeNestedClasses in class SourceWriter

writeOperations

protected boolean writeOperations()
Overrides:
writeOperations in class SourceWriter

writeStaticInit

protected boolean writeStaticInit()