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. |
|
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. |
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
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
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