org.metasyntactic.tool.codecounter
Class JavaSourceClass

java.lang.Object
  |
  +--org.metasyntactic.tool.codecounter.JavaSourceClass

public class JavaSourceClass
extends java.lang.Object

JavaSourceClass --- A record representing one Java class. A component of the JavaSource class.


Field Summary
 java.util.Vector innerClasses
           
 java.util.Vector methods
          The methods contained in this class.
 java.lang.String name
          The name of this class.
 java.lang.String packageName
          The package name of this class.
 
Constructor Summary
JavaSourceClass(java.lang.String packageName, JavaSourceTokenStream tokens)
          Finds and records in this object the next class declaration in tokens.
 
Method Summary
 java.util.Vector getInnerClasses()
          Returns a Vector of all the Inner classes in this class.
 java.util.Vector getMethods()
          Returns a Vector of all the JavaSourceMethod instances in this class.
 java.lang.String getName()
          Returns the name of this class.
 java.lang.String getPackageName()
          Returns the package name for this class.
 int linesOfCode()
          Returns the total lines of code in this JavaSourceClass.
 int methods()
           
 java.lang.String toString()
          Returns a string representing the JavaSourceClass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

methods

public java.util.Vector methods
The methods contained in this class.


innerClasses

public java.util.Vector innerClasses

name

public java.lang.String name
The name of this class.


packageName

public java.lang.String packageName
The package name of this class.

Constructor Detail

JavaSourceClass

public JavaSourceClass(java.lang.String packageName,
                       JavaSourceTokenStream tokens)
Finds and records in this object the next class declaration in tokens. Moves the tokens stream past subsequent whitespace to EOF or the start of the next class declaration in the stream.

Parameters:
tokens - The stream of JavaSourceTokens.
Method Detail

toString

public java.lang.String toString()
Returns a string representing the JavaSourceClass.

Overrides:
toString in class java.lang.Object

getPackageName

public java.lang.String getPackageName()
Returns the package name for this class.


getName

public java.lang.String getName()
Returns the name of this class.


getMethods

public java.util.Vector getMethods()
Returns a Vector of all the JavaSourceMethod instances in this class.


getInnerClasses

public java.util.Vector getInnerClasses()
Returns a Vector of all the Inner classes in this class.


linesOfCode

public int linesOfCode()
Returns the total lines of code in this JavaSourceClass.


methods

public int methods()
Returns:
The number of methods in this JavaSourceClass as an int.