javancss
Class Javancss

java.lang.Object
  extended by javancss.Javancss
All Implemented Interfaces:
ccl.util.Exitable

public class Javancss
extends Object
implements ccl.util.Exitable

While the Java parser class might be the heart of JavaNCSS, this class is the brain. This class controls input and output and invokes the Java parser.

Version:
$Id: Javancss.java 157 2009-05-24 06:59:58Z hboutemy $
Author:
Chr. Clemens Lee , recursive feature by Pääkö Hannu , additional javadoc metrics by Emilio Gongora , and Guillermo Rodriguez .

Constructor Summary
Javancss()
          Only way to create object that does not immediately start to parse.
Javancss(File sJavaSourceFile_)
           
Javancss(List vJavaSourceFiles_)
           
Javancss(Reader reader)
           
Javancss(String[] asArgs_)
          This is the constructor used in the main routine in javancss.Main.
Javancss(String[] asArgs_, String sRcsHeader_)
          Deprecated. use Javancss(String[]) instead, since the sRcsHeader_ parameter is not useful
 
Method Summary
 String getEncoding()
           
 Formatter getFormatter()
           
 List getFunctionMetrics()
           
 List getFunctions()
          The same as getFunctionMetrics?!
 List getImports()
           
 int getJdcl()
          JDCL stands for javadoc comment lines (while jvdc stands for number of javadoc comments).
 int getJvdc()
           
 Throwable getLastError()
           
 String getLastErrorMessage()
           
 int getLOC()
           
 int getMl()
           
 int getNcss()
           
 List getObjectMetrics()
           
 Object[] getPackage()
          Return info about package statement.
 List getPackageMetrics()
          Returns list of packages in the form PackageMetric objects.
 int getSl()
           
 boolean parseImports()
           
 String printFunctionNcss()
           
 String printJavaNcss()
           
 String printObjectNcss()
           
 String printPackageNcss()
           
 void setEncoding(String encoding)
           
 void setExit()
           
 void setSourceFile(File javaSourceFile_)
           
 void setXML(boolean bXML)
           
 boolean useXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Javancss

public Javancss(List vJavaSourceFiles_)

Javancss

public Javancss(File sJavaSourceFile_)

Javancss

public Javancss()
Only way to create object that does not immediately start to parse.


Javancss

public Javancss(Reader reader)

Javancss

public Javancss(String[] asArgs_,
                String sRcsHeader_)
         throws IOException
Deprecated. use Javancss(String[]) instead, since the sRcsHeader_ parameter is not useful

Throws:
IOException

Javancss

public Javancss(String[] asArgs_)
         throws IOException
This is the constructor used in the main routine in javancss.Main. Other constructors might be helpful to use Javancss out of other programs.

Throws:
IOException
Method Detail

getImports

public List getImports()

getPackage

public Object[] getPackage()
Return info about package statement. First element has name of package, then begin of line, etc.


getFunctions

public List getFunctions()
The same as getFunctionMetrics?!


printObjectNcss

public String printObjectNcss()

printFunctionNcss

public String printFunctionNcss()

printPackageNcss

public String printPackageNcss()

printJavaNcss

public String printJavaNcss()

parseImports

public boolean parseImports()

setSourceFile

public void setSourceFile(File javaSourceFile_)

getNcss

public int getNcss()

getLOC

public int getLOC()

getJvdc

public int getJvdc()

getJdcl

public int getJdcl()
JDCL stands for javadoc comment lines (while jvdc stands for number of javadoc comments).


getSl

public int getSl()

getMl

public int getMl()

getFunctionMetrics

public List getFunctionMetrics()

getObjectMetrics

public List getObjectMetrics()

getPackageMetrics

public List getPackageMetrics()
Returns list of packages in the form PackageMetric objects.


getLastErrorMessage

public String getLastErrorMessage()

getLastError

public Throwable getLastError()

setExit

public void setExit()
Specified by:
setExit in interface ccl.util.Exitable

setXML

public void setXML(boolean bXML)

useXML

public boolean useXML()

getFormatter

public Formatter getFormatter()

getEncoding

public String getEncoding()

setEncoding

public void setEncoding(String encoding)


Copyright © 1997-2011 Chr. Clemens Lee and companions. All Rights Reserved.