de.uni_paderborn.fujaba.codegen
Class CodeGenVisitor

java.lang.Object
  extended byde.uni_paderborn.fujaba.codegen.CodeGenVisitor
Direct Known Subclasses:
OOGenVisitor

public class CodeGenVisitor
extends java.lang.Object

Class CodeGenVisitor

Associations

                 -------- 0..1        hasVisitors        0..1
 CodeGenStrategy | name |------------------------------------- CodeGenVisitor
                 -------- codeGenStrategy      codeGenVisitor

                 0..1                        0..1
 CodeGenVisitor ---------------------------------- CodeGenStrategy
                 currentVisitor   currentStrategy
 

Version:
$Revision: 1.44.2.1 $
Author:
$Author: mksoft $

Field Summary
static java.lang.String EIFFEL_VISITOR
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String END_BLOCK_COMMENTARY
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String GNU_CPP_CLASS_VISITOR
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String GNU_CPP_HEADER_VISITOR
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String INDENT_STRING
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String JAVA_VISITOR
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String LINE_COMMENTARY
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String LINE_IN_BLOCK_COMMENTARY
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String START_BLOCK_COMMENTARY
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String TMP_FILE_EXTENDER
          No comment provided by developer, please add a comment to improve documentation.
 
Constructor Summary
CodeGenVisitor()
          Default Constructor
CodeGenVisitor(java.lang.String extender)
          Default Constructor
 
Method Summary
 void append(java.lang.String code)
          No comment provided by developer, please add a comment to improve documentation.
 void append(java.lang.StringBuffer code)
          No comment provided by developer, please add a comment to improve documentation.
 void appendFragment(CodeGenFragment fragment)
          No comment provided by developer, please add a comment to improve documentation.
 TextFragment appendTextFragment(java.lang.String name)
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String createCommentary(java.lang.String text)
          No comment provided by developer, please add a comment to improve documentation.
 void createDirectory(java.lang.String path)
          No comment provided by developer, please add a comment to improve documentation.
 java.io.File createFile(java.lang.String path, java.lang.String name)
          No comment provided by developer, please add a comment to improve documentation.
 void createFiles(java.lang.String path, java.lang.String name)
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String createIndentString()
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String createIndentString(java.lang.String indentText, int nr)
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String createLineCommentary(java.lang.String text)
          No comment provided by developer, please add a comment to improve documentation.
 void decIndentNr()
          No comment provided by developer, please add a comment to improve documentation.
 CodeGenStrategy getCodeGenStrategy()
           
 java.lang.StringBuffer getCurrentBuffer()
          Get the value of currentBuffer.
 java.io.File getCurrentFile()
          Get the value of currentFile.
 CodeGenFragment getCurrentFragment()
          Get the currentFragment attribute of the CodeGenVisitor object
 CodeGenStrategy getCurrentStrategy()
           
 java.lang.String getExtender()
          Get the value of extender.
 java.lang.String getFileName(FFile theFile)
          Get the fileName attribute of the OOGenVisitor object
 CodeGenFragment getFirstFragment()
          Get the firstFragment attribute of the CodeGenVisitor object
 int getIndentNr()
          Get the value of indentNr.
 java.lang.String getName()
          Get the value of name.
 java.lang.String getPath()
          Get the value of path.
 void incIndentNr()
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String indentText(java.lang.String text)
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String indentText(java.lang.String text, java.lang.String indentString)
          No comment provided by developer, please add a comment to improve documentation.
 void initBuffer()
          No comment provided by developer, please add a comment to improve documentation.
 void initVisitor(java.lang.String path, java.lang.String name, boolean createFiles)
          No comment provided by developer, please add a comment to improve documentation.
 boolean isCommentary(java.lang.String text)
          Get the commentary attribute of the CodeGenVisitor object
 void newLine()
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String removeIndentFromCommentary(java.lang.String text)
          No comment provided by developer, please add a comment to improve documentation.
 void removeYou()
          No comment provided by developer, please add a comment to improve documentation.
 boolean setCodeGenStrategy(CodeGenStrategy value)
           
 void setCurrentFile(java.io.File currentFile)
          Set the value of currentFile.
 boolean setCurrentStrategy(CodeGenStrategy value)
           
 void setExtender(java.lang.String extender)
          Set the value of extender.
 void setFirstFragment(CodeGenFragment fragment)
          Sets the firstFragment attribute of the CodeGenVisitor object
 void setIndentNr(int indentNr)
          Set the value of indentNr.
 void setName(java.lang.String name)
          Set the value of name.
 void setPath(java.lang.String path)
          Set the value of path.
 java.lang.String toString()
           
 boolean writeBufferToFile(java.lang.StringBuffer theBuffer, java.io.File theFile)
          No comment provided by developer, please add a comment to improve documentation.
 void writeFiles()
          No comment provided by developer, please add a comment to improve documentation.
 boolean writeFragmentsToFile(java.io.File theFile)
          No comment provided by developer, please add a comment to improve documentation.
 boolean writeFragmentsToStream(java.io.Writer theWriter)
          No comment provided by developer, please add a comment to improve documentation.
 boolean writeFragmentToStream(CodeGenFragment fragment, java.io.Writer theWriter)
          No comment provided by developer, please add a comment to improve documentation.
 boolean writeToStream(java.lang.String text, java.io.Writer theWriter)
          No comment provided by developer, please add a comment to improve documentation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JAVA_VISITOR

public static final java.lang.String JAVA_VISITOR
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

EIFFEL_VISITOR

public static final java.lang.String EIFFEL_VISITOR
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

GNU_CPP_CLASS_VISITOR

public static final java.lang.String GNU_CPP_CLASS_VISITOR
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

GNU_CPP_HEADER_VISITOR

public static final java.lang.String GNU_CPP_HEADER_VISITOR
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

TMP_FILE_EXTENDER

public static final java.lang.String TMP_FILE_EXTENDER
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

START_BLOCK_COMMENTARY

public java.lang.String START_BLOCK_COMMENTARY
No comment provided by developer, please add a comment to improve documentation.


END_BLOCK_COMMENTARY

public java.lang.String END_BLOCK_COMMENTARY
No comment provided by developer, please add a comment to improve documentation.


LINE_IN_BLOCK_COMMENTARY

public java.lang.String LINE_IN_BLOCK_COMMENTARY
No comment provided by developer, please add a comment to improve documentation.


LINE_COMMENTARY

public java.lang.String LINE_COMMENTARY
No comment provided by developer, please add a comment to improve documentation.


INDENT_STRING

public java.lang.String INDENT_STRING
No comment provided by developer, please add a comment to improve documentation.

Constructor Detail

CodeGenVisitor

public CodeGenVisitor()
Default Constructor


CodeGenVisitor

public CodeGenVisitor(java.lang.String extender)
Default Constructor

Parameters:
extender - No description provided
Method Detail

createFiles

public final void createFiles(java.lang.String path,
                              java.lang.String name)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
path - No description provided
name - No description provided

initBuffer

public void initBuffer()
No comment provided by developer, please add a comment to improve documentation.


initVisitor

public void initVisitor(java.lang.String path,
                        java.lang.String name,
                        boolean createFiles)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
path - No description provided
name - No description provided
createFiles - No description provided

writeFiles

public void writeFiles()
No comment provided by developer, please add a comment to improve documentation.


createDirectory

public final void createDirectory(java.lang.String path)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
path - No description provided

createFile

public final java.io.File createFile(java.lang.String path,
                                     java.lang.String name)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
path - No description provided
name - No description provided
Returns:
No description provided

writeBufferToFile

public final boolean writeBufferToFile(java.lang.StringBuffer theBuffer,
                                       java.io.File theFile)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
theBuffer - No description provided
theFile - No description provided
Returns:
No description provided

writeToStream

public final boolean writeToStream(java.lang.String text,
                                   java.io.Writer theWriter)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
text - No description provided
theWriter - No description provided
Returns:
No description provided

writeFragmentToStream

public final boolean writeFragmentToStream(CodeGenFragment fragment,
                                           java.io.Writer theWriter)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
fragment - No description provided
theWriter - No description provided
Returns:
No description provided

writeFragmentsToStream

public boolean writeFragmentsToStream(java.io.Writer theWriter)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
theWriter - No description provided
Returns:
No description provided

writeFragmentsToFile

public final boolean writeFragmentsToFile(java.io.File theFile)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
theFile - No description provided
Returns:
No description provided

append

public void append(java.lang.StringBuffer code)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
code - No description provided

append

public void append(java.lang.String code)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
code - No description provided

getFirstFragment

public CodeGenFragment getFirstFragment()
Get the firstFragment attribute of the CodeGenVisitor object

Returns:
The firstFragment value

setFirstFragment

public void setFirstFragment(CodeGenFragment fragment)
Sets the firstFragment attribute of the CodeGenVisitor object

Parameters:
fragment - The new firstFragment value

getCurrentFragment

public CodeGenFragment getCurrentFragment()
Get the currentFragment attribute of the CodeGenVisitor object

Returns:
The currentFragment value

appendFragment

public void appendFragment(CodeGenFragment fragment)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
fragment - No description provided

appendTextFragment

public TextFragment appendTextFragment(java.lang.String name)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
name - No description provided
Returns:
No description provided

isCommentary

public boolean isCommentary(java.lang.String text)
Get the commentary attribute of the CodeGenVisitor object

Parameters:
text - No description provided
Returns:
The commentary value

removeIndentFromCommentary

public java.lang.String removeIndentFromCommentary(java.lang.String text)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
text - No description provided
Returns:
No description provided

createCommentary

public java.lang.String createCommentary(java.lang.String text)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
text - No description provided
Returns:
No description provided

createLineCommentary

public java.lang.String createLineCommentary(java.lang.String text)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
text - No description provided
Returns:
No description provided

indentText

public java.lang.String indentText(java.lang.String text,
                                   java.lang.String indentString)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
text - No description provided
indentString - No description provided
Returns:
No description provided

createIndentString

public java.lang.String createIndentString(java.lang.String indentText,
                                           int nr)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
indentText - No description provided
nr - No description provided
Returns:
No description provided

getCurrentFile

public final java.io.File getCurrentFile()
Get the value of currentFile.

Returns:
Value of currentFile.

setCurrentFile

public final void setCurrentFile(java.io.File currentFile)
Set the value of currentFile.

Parameters:
currentFile - Value to assign to currentFile.

createIndentString

public final java.lang.String createIndentString()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

indentText

public final java.lang.String indentText(java.lang.String text)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
text - No description provided
Returns:
No description provided

newLine

public final void newLine()
No comment provided by developer, please add a comment to improve documentation.


getFileName

public java.lang.String getFileName(FFile theFile)
Get the fileName attribute of the OOGenVisitor object

Parameters:
theFile - No description provided
Returns:
The fileName value

getIndentNr

public final int getIndentNr()
Get the value of indentNr.

Returns:
Value of indentNr.

setIndentNr

public final void setIndentNr(int indentNr)
Set the value of indentNr.

Parameters:
indentNr - Value to assign to indentNr.

incIndentNr

public final void incIndentNr()
No comment provided by developer, please add a comment to improve documentation.


decIndentNr

public final void decIndentNr()
No comment provided by developer, please add a comment to improve documentation.


getExtender

public final java.lang.String getExtender()
Get the value of extender.

Returns:
Value of extender.

setExtender

public final void setExtender(java.lang.String extender)
Set the value of extender.

Parameters:
extender - Value to assign to extender.

getPath

public java.lang.String getPath()
Get the value of path.

Returns:
Value of path.

setPath

public void setPath(java.lang.String path)
Set the value of path.

Parameters:
path - Value to assign to path.

setCurrentStrategy

public boolean setCurrentStrategy(CodeGenStrategy value)
Parameters:
value - The new currentStrategy value
Returns:
No description provided
See Also:
#currentStrategy

getCurrentStrategy

public CodeGenStrategy getCurrentStrategy()
Returns:
The currentStrategy value
See Also:
#currentStrategy

getName

public java.lang.String getName()
Get the value of name.

Returns:
Value of name.

setName

public void setName(java.lang.String name)
Set the value of name.

Parameters:
name - Value to assign to name.

setCodeGenStrategy

public boolean setCodeGenStrategy(CodeGenStrategy value)
Parameters:
value - The new codeGenStrategy value
Returns:
No description provided
See Also:
#codeGenStrategy

getCodeGenStrategy

public CodeGenStrategy getCodeGenStrategy()
Returns:
The codeGenStrategy value
See Also:
#codeGenStrategy

getCurrentBuffer

public final java.lang.StringBuffer getCurrentBuffer()
Get the value of currentBuffer.

Returns:
Value of currentBuffer.

toString

public java.lang.String toString()
Returns:
short string representation of current object

removeYou

public void removeYou()
No comment provided by developer, please add a comment to improve documentation.