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

Org.SourceFlow.Java
Class JavaMethod

IComparable
   |
   +--CodeElement
         |
         +--JavaMethod

   in JavaMethod.cs

public class JavaMethod
extends CodeElement

A class generating a Java method declaration.


Field Summary
 const int ABSTRACT
          The abstract modifier constant.
 override int Category
          Returns a numeric category number for the code element.
 const int FINAL
          The final modifier constant.
 const int NATIVE
          The native modifier constant.
 const int PACKAGE_LOCAL
          The package local access modifier constant (i.e. no modifier).
 internal bool PrintCode
          The method source code print flag.
 const int PRIVATE
          The private access modifier constant.
 const int PROTECTED
          The protected access modifier constant.
 const int PUBLIC
          The public access modifier constant.
 const int STATIC
          The static modifier constant.
 const int STRICTFP
          The strict floating point modifier constant.
 const int SYNCHRONIZED
          The synchronized modifier constant.
   
Fields inherited from class CodeElement
Category
 
Constructor Summary
JavaMethod( string name )
          Creates a new method with the specified name.
JavaMethod( string name, string args )
          Creates a new method with the specified name and arguments.
JavaMethod( string name, string args, string returnType )
          Creates a new method with the specified arguments.
JavaMethod( int modifiers, string name, string args, string returnType )
          Creates a new method with the specified arguments.
 
Method Summary
 void AddCode( string codeLines )
          Adds one or more lines of actual code.
 void AddComment( JavaComment comment )
          Sets a comment for this method.
 void AddThrows( string className )
          Adds a class to the list of exceptions thrown.
 override void Print( StreamWriter output, CodeStyle style, int indent )
          Prints the code element to the specified output stream.
 override string ToString()
          Returns the method name.
   
Methods inherited from class CodeElement
CompareTo, Print, PrintSeparator
 

Field Detail

ABSTRACT

public const int ABSTRACT;
The abstract modifier constant.

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

FINAL

public const int FINAL;
The final modifier constant.

NATIVE

public const int NATIVE;
The native modifier constant.

PACKAGE_LOCAL

public const int PACKAGE_LOCAL;
The package local access modifier constant (i.e. no modifier).

PrintCode

 internal bool PrintCode;
The method source code print flag. This property will always be false if the method is abstract.

PRIVATE

public const int PRIVATE;
The private access modifier constant.

PROTECTED

public const int PROTECTED;
The protected access modifier constant.

PUBLIC

public const int PUBLIC;
The public access modifier constant.

STATIC

public const int STATIC;
The static modifier constant.

STRICTFP

public const int STRICTFP;
The strict floating point modifier constant.

SYNCHRONIZED

public const int SYNCHRONIZED;
The synchronized modifier constant.


Constructor Detail

JavaMethod

public JavaMethod( string name );
Creates a new method with the specified name. The method will not take any arguments and will return void.
Parameters:
name - the method name

JavaMethod

public JavaMethod( string name, string args );
Creates a new method with the specified name and arguments. The method will return void.
Parameters:
name - the method name
args - the argument list, excluding parenthesis

JavaMethod

public JavaMethod( string name, string args, string returnType );
Creates a new method with the specified arguments.
Parameters:
name - the method name
args - the argument list, excluding parenthesis
returnType - the return type

JavaMethod

public JavaMethod( int modifiers, string name, string args, string returnType );
Creates a new method with the specified arguments.
Parameters:
modifiers - the modifier flags to use
name - the method name
args - the argument list, excluding parenthesis
returnType - the return type


Method Detail

AddCode

public void AddCode( string codeLines );
Adds one or more lines of actual code.
Parameters:
codeLines - the lines of Java code to add

AddComment

public void AddComment( JavaComment comment );
Sets a comment for this method.
Parameters:
comment - the new method comment

AddThrows

public void AddThrows( string className );
Adds a class to the list of exceptions thrown.
Parameters:
className - the name of the exception thrown

Print

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

ToString

public override string ToString();
Returns the method name.
Returns:
the method name

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