Groovy Documentation

org.gmetrics.analyzer
Class FilesystemSourceAnalyzer

java.lang.Object
  org.gmetrics.analyzer.FilesystemSourceAnalyzer

class FilesystemSourceAnalyzer

SourceAnalyzer implementation that recursively processes files from the file system.

author:
Chris Mair
version:
$Revision: 69 $ - $Date: 2010-02-12 22:30:12 -0500 (Fri, 12 Feb 2010) $


Property Summary
static def DEFAULT_INCLUDES

static def SEP

String baseDirectory

The base (root) directory.

String excludes

The ant-style pattern of files to exclude from the analysis.

protected def fileFactory

String includes

The ant-style pattern of files to include in the analysis.

protected def sourceCodeFactory

 
Constructor Summary
FilesystemSourceAnalyzer()

 
Method Summary
ResultsNode analyze(MetricSet metricSet)

Analyze the source with the configured directory tree(s) using the specified metrics and return the results.

List getSourceDirectories()

protected boolean matches(SourceCode sourceCode)

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Property Detail

DEFAULT_INCLUDES

static final def DEFAULT_INCLUDES


SEP

static final def SEP


baseDirectory

String baseDirectory
The base (root) directory. Must not be null or empty.


excludes

String excludes
The ant-style pattern of files to exclude from the analysis. If null, exclude no files/directories. This pattern can optionally contain wildcards: '**', '*' and '?'. All file separators within paths are normalized to the standard '/' separator, so use the '/' separator within this pattern where necessary. Example: "**/*.groovy". If both includes and excludes are specified, then only files/directories that match at least one of the includes and none of the excludes are analyzed.


fileFactory

protected def fileFactory


includes

String includes
The ant-style pattern of files to include in the analysis. Defaults to match all files with names ending with '.groovy'. If null, match all files/directories. This pattern can optionally contain wildcards: '**', '*' and '?'. All file separators within paths are normalized to the standard '/' separator, so use the '/' separator within this pattern where necessary. Example: "**/*.groovy". If both includes and excludes are specified, then only files/directories that match at least one of the includes and none of the excludes are analyzed.


sourceCodeFactory

protected def sourceCodeFactory


 
Constructor Detail

FilesystemSourceAnalyzer

FilesystemSourceAnalyzer()


 
Method Detail

analyze

ResultsNode analyze(MetricSet metricSet)
Analyze the source with the configured directory tree(s) using the specified metrics and return the results.
param:
metricSet - the MetricSet to apply to each of the (applicable) files in the source directories
return:
the results from applying the metrics to all of the files in the source directories


getSourceDirectories

List getSourceDirectories()


matches

protected boolean matches(SourceCode sourceCode)


 

Groovy Documentation