Overview   Project   Class   Tree   Deprecated   Index 
SourceFlow 1.0.beta API Documentation
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Org.SourceFlow.Java
Class JavaFile

IComparable
   |
   +--CodeElement
         |
         +--CodeContainer
               |
               +--CodeFile
                     |
                     +--JavaFile

   in JavaFile.cs

public class JavaFile
extends CodeFile

A class generating a Java code file.


Field Summary
 override int Category
          Returns a numeric category number for the code element.
 override string Name
          Returns the file name.
   
Fields inherited from class CodeFile
File, Name
   
Fields inherited from class CodeContainer
Count
   
Fields inherited from class CodeElement
Category
 
Constructor Summary
JavaFile( DirectoryInfo basedir )
          Creates a new Java code file in the specified file.
JavaFile( DirectoryInfo basedir, JavaPackage filePackage )
          Creates a new Java code file in the specified base directory and package.
 
Method Summary
 void AddClass( JavaClass cls )
          Adds a class to the file.
 void AddComment( JavaComment comment )
          Adds a comment to this file.
 void AddImport( JavaImport imp )
          Adds an import to the file.
 void AddInterface( JavaInterface ifc )
          Adds an interface to the file.
 override void Print( StreamWriter output, CodeStyle style, int indent )
          Prints the file contents to the specified output stream.
   
Methods inherited from class CodeFile
ToString, Write
   
Methods inherited from class CodeContainer
AddElement, PrintContents
   
Methods inherited from class CodeElement
CompareTo, Print, PrintSeparator
 

Field Detail

Category

public override 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.
Returns:
the category number

Name

public override string Name;
Returns the file name. Note that if no class has been added to the file, a default file name will be returned.
Returns:
the file name


Constructor Detail

JavaFile

public JavaFile( DirectoryInfo basedir );
Creates a new Java code file in the specified file.
Parameters:
basedir - the base output directory

JavaFile

public JavaFile( DirectoryInfo basedir, JavaPackage filePackage );
Creates a new Java code file in the specified base directory and package. The file name will be retrieved from the first class or interface added to this file.
Parameters:
basedir - the base output directory
filePackage - the package the file belongs to


Method Detail

AddClass

public void AddClass( JavaClass cls );
Adds a class to the file.
Parameters:
cls - the class to add

AddComment

public void AddComment( JavaComment comment );
Adds a comment to this file.
Parameters:
comment - the new file comment

AddImport

public void AddImport( JavaImport imp );
Adds an import to the file.
Parameters:
imp - the import to add

AddInterface

public void AddInterface( JavaInterface ifc );
Adds an interface to the file.
Parameters:
ifc - the interface to add

Print

public override void Print( StreamWriter output, CodeStyle style, int indent );
Prints the file contents to the specified output stream.
Parameters:
output - the output stream
style - the code style to use
indent - the indentation level

 Overview   Project   Class   Tree   Deprecated   Index 
SourceFlow 1.0.beta API Documentation
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD