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

Org.SourceFlow.Java
Class JavaImport

IComparable
   |
   +--CodeElement
         |
         +--JavaImport

   in JavaImport.cs

public class JavaImport
extends CodeElement

A class generating a Java import declaration.


Field Summary
 override int Category
          Returns a numeric category number for the code element.
   
Fields inherited from class CodeElement
Category
 
Constructor Summary
JavaImport( JavaPackage pkg )
          Creates a new import declaration, importing all classes of a specified package.
JavaImport( string packageName )
          Creates a new import declaration, importing all classes of a specified package.
JavaImport( JavaPackage pkg, JavaClass cls )
          Creates a new import declaration, importing the selected class from the specified package.
JavaImport( string packageName, string className )
          Creates a new import declaration, importing the selected class from the specified package.
 
Method Summary
 override int CompareTo( object obj )
          Compares this object to another one.
 override bool Equals( object obj )
          Returns true if this object is equal to another import.
 override void Print( StreamWriter output, CodeStyle style, int indent )
          Prints the code element to the specified output stream.
protected internal override void PrintSeparator( StreamWriter output, CodeElement prev )
          Prints a separator line between this element and the previous element in a container.
 override string ToString()
          Returns a string description of the imported packages.
   
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


Constructor Detail

JavaImport

public JavaImport( JavaPackage pkg );
Creates a new import declaration, importing all classes of a specified package.
Parameters:
pkg - the package to import

JavaImport

public JavaImport( string packageName );
Creates a new import declaration, importing all classes of a specified package.
Parameters:
packageName - the fully qualified package name

JavaImport

public JavaImport( JavaPackage pkg, JavaClass cls );
Creates a new import declaration, importing the selected class from the specified package.
Parameters:
pkg - the package containing the specified class
cls - the class to import

JavaImport

public JavaImport( string packageName, string className );
Creates a new import declaration, importing the selected class from the specified package.
Parameters:
packageName - the fully qualified package name
className - the class name


Method Detail

CompareTo

public override int CompareTo( object obj );
Compares this object to another one. The comparison is based primarily on the code element category, and secondarily on the package name.
Parameters:
obj - the object to compare to
Returns:
negative if this object preceeds the other one, zero (0) if the objects are equal, or positive if this object succeeds the other one

Equals

public override bool Equals( object obj );
Returns true if this object is equal to another import.
Parameters:
obj - the object to compare to
Returns:
true if the objects are equal, or false otherwise

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

PrintSeparator

protected internal override void PrintSeparator( StreamWriter output, CodeElement prev );
Prints a separator line between this element and the previous element in a container. This method will NOT be called for the first element in a container, as it has no previous element. This method prints a single newline only if the category numbers differ.
Parameters:
output - the output stream
prev - the previous code element

ToString

public override string ToString();
Returns a string description of the imported packages.
Returns:
the string representation of this import

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