Groovy Documentation
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _

A

AbcAstVisitor - Class in org.gmetrics.metric.abc
AST Visitor for calculating the ABC Metric for a class/method.
AbcMetric - Class in org.gmetrics.metric.abc
Calculate the ABC Metric for a class/method.
AbcMetricResult - Class in org.gmetrics.metric.abc.result
A MetricResult specifically for the ABC metric
AbcMetricResult(Metric, AbcVector, Integer) - Constructor in AbcMetricResult
AbcVector - Class in org.gmetrics.metric.abc
Represents a single ABC Metric result: a vector of the three A, B, C values.
AbcVector(int, int, int) - Constructor in AbcVector
AbstractAstVisitor - Class in org.gmetrics.metric
Abstract superclass for Groovy AST Visitors
AbstractMethodMetric - Class in org.gmetrics.metric
Abstract superclass for method-based metrics.
AbstractMetric - Class in org.gmetrics.metric
Abstract superclass for metrics.
AbstractReportWriter - Class in org.gmetrics.report
Abstract superclass for ReportWriter implementation classes.
AbstractSourceCode - Class in org.gmetrics.source
Abstract superclass for SourceCode implementations
addChild(String, ResultsNode) - Method in PackageResultsNode
addChildIfNotEmpty(String, ResultsNode) - Method in PackageResultsNode
addClassMetricResult(ClassMetricResult) - Method in ClassResultsNode
addConfiguredOption(ReportOption) - Method in Report
addConfiguredReport(Report) - Method in GMetricsTask
Ant-defined method (by convention), called with each instance of a nested element within this task.
addFileset(FileSet) - Method in GMetricsTask
Ant-defined method (by convention), called with each instance of a nested element within this task.
addMetric(Metric) - Method in CompositeMetricSet
Add a single Metric to this MetricSet
addMetricResult(MetricResult) - Method in MethodResultsNode
addMetricSet(MetricSet) - Method in CompositeMetricSet
Add all of the Metrics within the specified MetricSet to this MetricSet
AggregateAbcMetricResult - Class in org.gmetrics.metric.abc.result
An aggregate MetricResult implementation specifically for the ABC Metric.
AggregateAbcMetricResult(Metric, Collection, Integer) - Constructor in AggregateAbcMetricResult
AggregateNumberMetricResult - Class in org.gmetrics.result
A NumberMetricResult that aggregates multiple values.
AggregateNumberMetricResult(Metric, Collection, Integer) - Constructor in AggregateNumberMetricResult
AnalysisContext - Class in org.gmetrics.analyzer
Holds information related to the configuration and context for the source code analysis.
analyze(MetricSet) - Method in AntFileSetSourceAnalyzer
Analyze all source code using the specified MetricSet and return the results node.
analyze(MetricSet) - Method in FilesystemSourceAnalyzer
Analyze the source with the configured directory tree(s) using the specified metrics and return the results.
analyze(MetricSet) - Method in SourceAnalyzer
Analyze all source code using the specified set of Metrics and return the results.
AntFileSetSourceAnalyzer - Class in org.gmetrics.ant
SourceAnalyzer implementation that gets source files from one or more Ant FileSets.
AntFileSetSourceAnalyzer(Project, List) - Constructor in AntFileSetSourceAnalyzer
Construct a new instance on the specified List of Ant FileSets.
applyMetric(Metric) - Method in PackageResultsNode
applyToClass(ClassNode, SourceCode) - Method in AbstractMetric
applyToClass(ClassNode, SourceCode) - Method in Metric
applyToPackage(Collection) - Method in AbstractMetric
applyToPackage(Collection) - Method in Metric
AstUtil - Class in org.gmetrics.util
Contains static utility methods related to Groovy AST.
AstVisitor - Interface in org.gmetrics.metric
Interface for Groovy AST Visitors

B

BASE_MESSAGES_BUNDLE - Field in AbstractReportWriter
BasicHtmlReportWriter - Class in org.gmetrics.report
ReportWriter that generates a basic HTML report.
buildSeriesData(ResultsNode, MetricSet) - Method in SingleSeriesCriteriaFilter

C

calculate(ClosureExpression, SourceCode) - Method in AbcMetric
calculate(ClosureExpression, SourceCode) - Method in AbstractMethodMetric
calculate(ClosureExpression, SourceCode) - Method in CyclomaticComplexityMetric
calculate(ClosureExpression, SourceCode) - Method in MethodLineCountMetric
calculateForClass(ClassNode, SourceCode) - Method in AbstractMethodMetric
calculateForClass(ClassNode, SourceCode) - Method in AbstractMetric
calculateForClass(ClassNode, SourceCode) - Method in ClassLineCountMetric
calculateForPackage(Collection) - Method in AbstractMetric
calculateFunctions(Collection) - Method in AggregateAbcMetricResult
calculateFunctions(Metric, Collection) - Method in AggregateNumberMetricResult
ClassLineCountAstVisitor - Class in org.gmetrics.metric.linecount
ClassLineCountMetric - Class in org.gmetrics.metric.linecount
Metric for counting the lines of code for classes and interfaces.
ClassMetricResult - Class in org.gmetrics.result
Represents the results for a single metric for a single class
ClassMetricResult(MetricResult, Map) - Constructor in ClassMetricResult
ClassPathResource - Class in org.gmetrics.util.io
A Resource implementation for resources available on the classpath.
ClassPathResource(String) - Constructor in ClassPathResource
Construct a new ClassPathResource
path:
- the path to the resource (file).
ClassResultsNode - Class in org.gmetrics.resultsnode
Represents a node in the hierarchy of metric result nodes
CompositeMetricSet - Class in org.gmetrics.metricset
A MetricSet implementation that aggregates a set of MetricSets and Metrics.
containsClassResults() - Method in ClassResultsNode
containsClassResults() - Method in MethodResultsNode
containsClassResults() - Method in PackageResultsNode
containsClassResults() - Method in ResultsNode
createAggregateMetricResult(Collection, ASTNode) - Method in AbcMetric
createAggregateMetricResult(Collection, ASTNode) - Method in AbstractMetric
createGMetricsRunner - Field in GMetricsTask
createSourceUnit() - Method in AbstractSourceCode
createSourceUnit() - Method in SourceFile
createSourceUnit() - Method in SourceString
CUSTOM_MESSAGES_BUNDLE - Field in AbstractReportWriter
customMessagesBundleName - Field in AbstractReportWriter
CyclomaticComplexityAstVisitor - Class in org.gmetrics.metric.cyclomatic
AST Visitor for calculating the Cyclomatic Complexity for a method or closure field.
CyclomaticComplexityMetric - Class in org.gmetrics.metric.cyclomatic
Metric for counting the (McCabe) Cyclomatic Complexity for methods and closure fields.

D

DEFAULT_CSS_FILE - Field in SingleSeriesHtmlReportWriter
DEFAULT_OUTPUT_FILE - Field in BasicHtmlReportWriter
DEFAULT_OUTPUT_FILE - Field in SingleSeriesHtmlReportWriter
DEFAULT_OUTPUT_FILE - Field in XmlReportWriter
DEFAULT_TITLE - Field in SingleSeriesHtmlReportWriter
DefaultMetricSet - Class in org.gmetrics.metricset
A MetricSet implementation that returns the default static List of Metrics.
DefaultResourceFactory - Class in org.gmetrics.util.io
Default implementation of ResourceFactory.
description(String) - Method in TopLevelDelegate

E

execute() - Method in GMetricsRunner
execute() - Method in GMetricsTask
Execute this Ant Task

F

fileFactory - Field in FilesystemSourceAnalyzer
fileSets - Field in AntFileSetSourceAnalyzer
fileSets - Field in GMetricsTask
FilesystemSourceAnalyzer - Class in org.gmetrics.analyzer
SourceAnalyzer implementation that recursively processes files from the file system.
findOrAddResultsNodeForPath(String) - Method in AntFileSetSourceAnalyzer
findResultsNodeForPath(String) - Method in AntFileSetSourceAnalyzer
FunctionsCriteriaFilter - Class in org.gmetrics.report
Provides data and behavior for enabling reports to filter the set of functions included in a report.

G

getAbcVector() - Method in AggregateAbcMetricResult
getAnnotation(AnnotatedNode, String) - Method in AstUtil
Return the AnnotationNode for the named annotation, or else null.
getAst() - Method in AbstractSourceCode
Return the Groovy AST (Abstract Syntax Tree) for this source file
getAst() - Method in SourceCode
Return the Groovy AST (Abstract Syntax Tree) for this source file
getAt(String) - Method in AbcMetricResult
getAt(String) - Method in AggregateAbcMetricResult
getAt(String) - Method in AggregateNumberMetricResult
getAt(String) - Method in MetricResult
Return the metric result value for the named function (e.g.
getAt(String) - Method in NumberMetricResult
getAverageAbcVector() - Method in AggregateAbcMetricResult
Return the average of this set of ABC vectors.
getBaseLevel() - Method in Metric
getChildren() - Method in MethodResultsNode
getChildren() - Method in PackageResultsNode
getChildren() - Method in ResultsNode
getCount() - Method in AbcMetricResult
getCount() - Method in AggregateAbcMetricResult
getCount() - Method in AggregateNumberMetricResult
getCount() - Method in MetricResult
Return the count of the nodes/results that are descendants.
getCount() - Method in NumberMetricResult
getDescriptionForMetric(Metric) - Method in XmlReportWriter
getDescriptionForMetricName(String) - Method in BasicHtmlReportWriter
getFormattedTimestamp() - Method in AbstractReportWriter
getFunctions() - Method in Metric
getGMetricsVersion() - Method in AbstractReportWriter
getInputStream() - Method in ClassPathResource
Open an InputStream on the classpath resource path
getInputStream() - Method in Resource
Return the InputStream for this resource.
getInputStream() - Method in UrlResource
Open a FileInputStream on the file
getLevel() - Method in ResultsNode
getLineNumber() - Method in MetricResult
Return the line number associated with this metric result (i.e., method or class)
getLineNumberForCharacterIndex(int) - Method in AbstractSourceCode
Return the line index for the line containing the character at the specified index within the source code.
getLineNumberForCharacterIndex(int) - Method in SourceCode
Return the line index for the line containing the character at the specified index within the source code.
getLines() - Method in AbstractSourceCode
@return the List of lines of the source code (with line terminators removed)
getLines() - Method in SourceCode
@return the List of lines of the source code (with line terminators removed)
getMagnitude() - Method in AbcVector
Return the magnitude of this ABC vector, specifically: |ABC| = sqrt((A*A)+(B*B)+(C*C))
getMethodArguments(MethodCallExpression) - Method in AstUtil
Return the List of Arguments for the specified MethodCallExpression.
getMetric() - Method in MetricResult
@return the Metric for which this object represents results.
getMetricResult(Metric) - Method in ClassResultsNode
getMetricResult(Metric) - Method in MethodResultsNode
getMetricResult(Metric) - Method in PackageResultsNode
getMetricResult(Metric) - Method in ResultsNode
getMetricResults() - Method in ResultsNode
getMetrics() - Method in CompositeMetricSet
Returns:
a List of Metric objects.
getMetrics() - Method in DefaultMetricSet
getMetrics() - Method in GroovyDslMetricSet
@return a List of Metric objects
getMetrics() - Method in ListMetricSet
@return a List of Metric objects
getMetrics() - Method in MetricSet
getMetricSet() - Method in MetricSetBuilder
getMetricSet() - Method in TopLevelDelegate
getName() - Method in Metric
getName(String) - Method in PathUtil
getName() - Method in SourceCode
Get the logical name for this source code.
getName() - Method in SourceFile
@return the filename for this source file, excluding path
getNames() - Method in MetricLevel
getParent(String) - Method in PathUtil
getPath() - Method in SourceCode
Get the logical path for this source code.
getPath() - Method in SourceFile
@return the normalized path for this source file, including filename
getResource(String) - Method in DefaultResourceFactory
Return a Resource instance suitable for the specified path.
getResource(String) - Method in ResourceFactory
Return a Resource instance suitable for the specified path.
getResourceBundleString(String, String) - Method in AbstractReportWriter
getSourceDirectories() - Method in AntFileSetSourceAnalyzer
getSourceDirectories() - Method in FilesystemSourceAnalyzer
getSourceDirectories() - Method in SourceAnalyzer
Return the List of source directories to be analyzed.
getSourceUnit() - Method in AbstractAstVisitor
getText() - Method in SourceCode
@return the full text of the source code
getText() - Method in SourceFile
@return the full text of the source code
getText() - Method in SourceString
@return the full text of the source code
getTimestamp - Field in AbstractReportWriter
getTotalAbcVector() - Method in AggregateAbcMetricResult
Return the sum of this set of ABC vectors.
getVariableExpressions(DeclarationExpression) - Method in AstUtil
Return the List of VariableExpression objects referenced by the specified DeclarationExpression.
GMETRICS_URL - Field in AbstractReportWriter
GMetricsRunner - Class in org.gmetrics
Helper class to run GMetrics.
GMetricsTask - Class in org.gmetrics.ant
Ant Task for GMetrics.
GroovyDslMetricSet - Class in org.gmetrics.metricset
A MetricSet implementation that parses a Groovy DSL of Metric definitions.
GroovyDslMetricSet(String) - Constructor in GroovyDslMetricSet
Construct a new instance on the specified Groovy DSL MetricSet file path

H


I

includesFunction(Metric, String) - Method in FunctionsCriteriaFilter
includesLevel(Metric, MetricLevel) - Method in LevelsCriteriaFilter
includesMetric(Metric) - Method in MetricsCriteriaFilter
includesName(Map, Metric, String) - Method in MetricCriteriaFilterHelper
initializeDefaultResourceBundle() - Method in AbstractReportWriter
initializeResourceBundle - Field in AbstractReportWriter
isBlock(Statement) - Method in AstUtil
Return true if the Statement is a block
isEmptyBlock(Statement) - Method in AstUtil
Return true if the Statement is a block and it is empty (contains no "meaningful" statements).
isEnabled() - Method in Metric
isFinalVariable(DeclarationExpression, SourceCode) - Method in AstUtil
Return true if the DeclarationExpression represents a 'final' variable declaration.
isFirstVisit(def) - Method in AbstractAstVisitor
Return true if the AST expression has not already been visited.
isFromGeneratedSourceCode(ASTNode) - Method in AstUtil
@return true if the ASTNode was generated (synthetic) rather than from the "real" input source code.
isMethodCall(MethodCallExpression, String, String) - Method in AstUtil
Return true only if the MethodCallExpression represents a method call for the specified method object (receiver) and method name.
isMethodNamed(MethodCallExpression, String) - Method in AstUtil
Return true only if the MethodCallExpression represents a method call for the specified method name
isNotAnInterface(ClassNode) - Method in AbstractMetric
isSyntheticNonRunMethod(MethodNode) - Method in AbstractAstVisitor

J


K


L

LevelsCriteriaFilter - Class in org.gmetrics.report
Provides data and behavior for enabling reports to filter the set of metrics included in a report.
line(int) - Method in AbstractSourceCode
Get the trimmed line at the specified index
line(int) - Method in SourceCode
Get the trimmed line at the specified index
ListMetricSet - Class in org.gmetrics.metricset
A MetricSet implementation that returns a static List of Metrics passed into its constructor.
ListMetricSet(List) - Constructor in ListMetricSet
Construct a new instance from the specified List of metrics.
LOG - Field in AbstractReportWriter

M

matches(SourceCode) - Method in FilesystemSourceAnalyzer
matches(SourceCode) - Method in SourceCodeCriteria
Return true if all of the criteria specified in this object apply to thw SourceCode.
matches(String) - Method in WildcardPattern
Return true if the specified String matches the pattern or if the original patternString (specified in the constructor) was null or empty and the value for defaultMatches (also specified in the constructor) was true.
MAX_SOURCE_LINE_LENGTH - Field in AbstractAstVisitor
MethodLineCountAstVisitor - Class in org.gmetrics.metric.linecount
AST Visitor for calculating the lines of code for a method or closure field.
MethodLineCountMetric - Class in org.gmetrics.metric.linecount
Metric for counting the lines of code for methods and closure fields.
methodMissing(String, def) - Method in MetricSetDelegate
MethodResultsNode - Class in org.gmetrics.resultsnode
Represents a method result node in the hierarchy of metric result nodes
Metric - Interface in org.gmetrics.metric
Represents a metric
metric(Class, Closure) - Method in TopLevelDelegate
MetricCriteriaFilterHelper - Class in org.gmetrics.report
Provides common static helper methods for classes that provides data and behavior for enabling reports to filter the results included within a report based a filter map keyed on the metric name.
MetricLevel - Enum in org.gmetrics.metric
Enum representing the level at which a metric is applied - either method, class or package
MetricResult - Interface in org.gmetrics.result
Represents the result from applying a single metric (to a package, class or method)
MetricsCriteriaFilter - Class in org.gmetrics.report
Provides data and behavior for enabling reports to filter the set of metrics included in a report.
MetricSet - Interface in org.gmetrics.metricset
Represents a set of (configured) Metric objects
metricset(Closure) - Method in MetricSetBuilder
metricset(String, Closure) - Method in TopLevelDelegate
MetricSetBuilder - Class in org.gmetrics.metricset
A Builder for MetricSets.
MetricSetDelegate - Class in org.gmetrics.metricset
MetricSetDelegate(MetricSet) - Constructor in MetricSetDelegate

N

normalize(String) - Method in PathUtil
normalizePath(String) - Method in AbstractSourceCode
Return the normalized value of the specified path.
NumberMetricResult - Class in org.gmetrics.result
A MetricResult for numbers (integers, BigDecimals, etc.)
NumberMetricResult(Metric, def, Integer) - Constructor in NumberMetricResult

O


P

PackageResultsNode - Class in org.gmetrics.resultsnode
Represents a package node in the hierarchy of metric result nodes
parseCriteria(String) - Method in MetricCriteriaFilterHelper
Parse the criteria string
parseCriteriaForSingleMetric(Map, String) - Method in MetricCriteriaFilterHelper
PathUtil - Class in org.gmetrics.util
Contains static utility methods related to file and directory paths.
PropertyUtil - Class in org.gmetrics.util
Contains property-related static utility methods

Q


R

Report - Class in org.gmetrics.ant
JavaBean class holding the properties for a element with the GMetrics Ant Task.
ReportOption - Class in org.gmetrics.ant
JavaBean class holding the properties for a
ReportWriter - Interface in org.gmetrics.report
Common interface for report writer implementations
reportWriters - Field in GMetricsTask
Resource - Interface in org.gmetrics.util.io
Defines the interface for objects that represent a resource (e.g. a file) and provide access to its InputStream.
resourceBundle - Field in AbstractReportWriter
ResourceFactory - Interface in org.gmetrics.util.io
Defines the interface for factory objects that create/return Resource instances.
ResultsNode - Interface in org.gmetrics.resultsnode
Represents the interface for a single node in the hierarchical network of results nodes
rootResultsNode - Field in AntFileSetSourceAnalyzer

S

SeriesValue - Class in org.gmetrics.report
Holder for a single data item within a series
SeriesValue(String, Object) - Constructor in SeriesValue
setFunctions(String) - Method in FunctionsCriteriaFilter
setLevels(String) - Method in LevelsCriteriaFilter
setMetrics(String) - Method in MetricsCriteriaFilter
setPath(String) - Method in SourceString
setPropertyFromString(Object, String, String) - Method in PropertyUtil
Set the value of the named property on the specified Object from a String value.
setSourceCode(SourceCode) - Method in AstVisitor
Set the SourceCode associated with this visitor
SingleSeriesCriteriaFilter - Class in org.gmetrics.report
Provides data and behavior for enabling reports to filter the results based on a single metric, single level and single function to provide a single series of data.
SingleSeriesHtmlReportWriter - Class in org.gmetrics.report
ReportWriter that generates a HTML report for a single series of metric values.
SOURCE_LINE_LAST_SEGMENT_LENGTH - Field in AbstractAstVisitor
SourceAnalyzer - Interface in org.gmetrics.analyzer
The interface for objects that can analyze the source files within one or more directory trees using a specified MetricSet and produce report results.
SourceCode - Interface in org.gmetrics.source
Represents a unit of source code to be analyzed
SourceCodeCriteria - Class in org.gmetrics.source
Represents the set of criteria used to filter source code (files).
sourceCodeFactory - Field in FilesystemSourceAnalyzer
SourceFile - Class in org.gmetrics.source
The SourceCode implementation for a single file.
SourceFile(File) - Constructor in SourceFile
Construct a new instance for the file at the specified path
sourceLine(ASTNode) - Method in AbstractAstVisitor
Return the source line corresponding to the specified AST node
SourceString - Class in org.gmetrics.source
SourceCode implementation that uses source from a pre-defined String.
SourceString(String, String, String) - Constructor in SourceString
Construct a new instance for the file at the specified path

T

TopLevelDelegate - Class in org.gmetrics.metricset
toString() - Method in AbcMetricResult
toString() - Method in AbcVector
toString() - Method in AggregateAbcMetricResult
toString() - Method in AggregateNumberMetricResult
toString() - Method in ClassMetricResult
toString() - Method in ClassResultsNode
toString() - Method in MethodResultsNode
toString() - Method in MetricLevel
toString() - Method in NumberMetricResult
toString() - Method in PackageResultsNode
toString() - Method in SeriesValue
toString() - Method in SourceFile
toString() - Method in SourceString

U

UrlResource - Class in org.gmetrics.util.io
A Resource implementation based on java.net.URL.
UrlResource(String) - Constructor in UrlResource
Construct a new FileResource
path:
- the filesystem path to the file.

V

VERSION_FILE - Field in AbstractReportWriter
visitBinaryExpression(BinaryExpression) - Method in AbcAstVisitor
visitBinaryExpression(BinaryExpression) - Method in CyclomaticComplexityAstVisitor
visitBooleanExpression(BooleanExpression) - Method in AbcAstVisitor
visitCatchStatement(CatchStatement) - Method in CyclomaticComplexityAstVisitor
visitClass(ClassNode) - Method in ClassLineCountAstVisitor
visitClosureExpression(ClosureExpression) - Method in MethodLineCountAstVisitor
visitConstructorCallExpression(ConstructorCallExpression) - Method in AbcAstVisitor
visitForLoop(ForStatement) - Method in CyclomaticComplexityAstVisitor
visitIfElse(IfStatement) - Method in AbcAstVisitor
visitIfElse(IfStatement) - Method in CyclomaticComplexityAstVisitor
visitMethod(MethodNode) - Method in AbcAstVisitor
visitMethod(MethodNode) - Method in CyclomaticComplexityAstVisitor
visitMethod(MethodNode) - Method in MethodLineCountAstVisitor
visitMethodCallExpression(MethodCallExpression) - Method in AbcAstVisitor
visitNotExpression(NotExpression) - Method in AbcAstVisitor
visitPostfixExpression(PostfixExpression) - Method in AbcAstVisitor
visitPrefixExpression(PrefixExpression) - Method in AbcAstVisitor
visitPropertyExpression(PropertyExpression) - Method in AbcAstVisitor
visitPropertyExpression(PropertyExpression) - Method in CyclomaticComplexityAstVisitor
visitSwitch(SwitchStatement) - Method in AbcAstVisitor
visitSwitch(SwitchStatement) - Method in CyclomaticComplexityAstVisitor
visitTernaryExpression(TernaryExpression) - Method in AbcAstVisitor
visitTernaryExpression(TernaryExpression) - Method in CyclomaticComplexityAstVisitor
visitTryCatchFinally(TryCatchStatement) - Method in AbcAstVisitor
visitWhileLoop(WhileStatement) - Method in CyclomaticComplexityAstVisitor

W

WildcardPattern - Class in org.gmetrics.util
Represents a string pattern that may optionally include wildcards ('*', '**' or '?')
WildcardPattern(String, boolean) - Constructor in WildcardPattern
Construct a new WildcardPattern instance on a single pattern or a comma-separated list of patterns.
writeReport(ResultsNode, AnalysisContext) - Method in AbstractReportWriter
writeReport(Writer, ResultsNode, AnalysisContext) - Method in BasicHtmlReportWriter
writeReport(ResultsNode, AnalysisContext) - Method in ReportWriter
writeReport(Writer, ResultsNode, AnalysisContext) - Method in SingleSeriesHtmlReportWriter
writeReport(Writer, ResultsNode, AnalysisContext) - Method in XmlReportWriter

X

XmlReportWriter - Class in org.gmetrics.report
ReportWriter that generates an XML report.

Y


Z


_


Groovy Documentation