org.sourceflow.visualbasic
Class VisualBasicFile

java.lang.Object
  extended byorg.sourceflow.CodeElement
      extended byorg.sourceflow.CodeContainer
          extended byorg.sourceflow.CodeFile
              extended byorg.sourceflow.visualbasic.VisualBasicFile
All Implemented Interfaces:
java.lang.Comparable

public class VisualBasicFile
extends CodeFile

A class generating a Visual Basic source code file.


Constructor Summary
VisualBasicFile(java.io.File basedir, java.lang.String basename)
          Creates a new Visual Basic source code file.
 
Method Summary
 void addClass(VisualBasicClass c)
          Adds a class declaration to the file.
 void addComment(VisualBasicComment comment)
          Adds a file comment.
 void addEnumeration(VisualBasicEnumeration e)
          Adds an enumeration declaration to the file.
 void addImports(VisualBasicImports imports)
          Adds an imports declaration to the file.
 void addNamespace(VisualBasicNamespace namespace)
          Adds a namespace declaration to the file.
 int category()
          Returns a numeric category number for the code element.
 java.lang.String getName()
          Returns the file name.
 void print(java.io.PrintWriter out, CodeStyle style, int indent)
          Prints the file contents to the specified output stream.
 
Methods inherited from class org.sourceflow.CodeFile
getFile, toString, write
 
Methods inherited from class org.sourceflow.CodeContainer
addElement, printContents, size
 
Methods inherited from class org.sourceflow.CodeElement
compareTo, printSeparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VisualBasicFile

public VisualBasicFile(java.io.File basedir,
                       java.lang.String basename)
Creates a new Visual Basic source code file.

Parameters:
basedir - the base output directory
basename - the base file name (without extension)
Method Detail

getName

public java.lang.String getName()
Returns the file name.

Specified by:
getName in class CodeFile
Returns:
the file name.

category

public int category()
Returns a numeric category number for the code element. A lower category number implies that the code element should be placed before code elements with a higher category number within a declaration.

Specified by:
category in class CodeElement
Returns:
the category number

addComment

public void addComment(VisualBasicComment comment)
Adds a file comment.

Parameters:
comment - the file comment to add

addImports

public void addImports(VisualBasicImports imports)
Adds an imports declaration to the file.

Parameters:
imports - the imports declaration to add

addNamespace

public void addNamespace(VisualBasicNamespace namespace)
Adds a namespace declaration to the file.

Parameters:
namespace - the namespace declaration to add

addClass

public void addClass(VisualBasicClass c)
Adds a class declaration to the file.

Parameters:
c - the class declaration to add

addEnumeration

public void addEnumeration(VisualBasicEnumeration e)
Adds an enumeration declaration to the file.

Parameters:
e - the enumeration to add

print

public void print(java.io.PrintWriter out,
                  CodeStyle style,
                  int indent)
Prints the file contents to the specified output stream.

Specified by:
print in class CodeElement
Parameters:
out - the output stream
style - the code style to use
indent - the indentation level