Groovy Documentation

groovy.org.codenarc.source
[Groovy] Class SourceCodeCriteria

java.lang.Object
  groovy.org.codenarc.source.SourceCodeCriteria

class SourceCodeCriteria

Represents the set of criteria used to filter source code (files). Provides an API to determine whether a particular source code file matches the criteria.

This is an internal class and its API is subject to change.

Authors:
Chris Mair


Property Summary
String applyToFileNames

Only apply to source code (file) names matching this value.

String applyToFilesMatching

Apply only to source code (file) pathnames matching this regular expression.

String doNotApplyToFileNames

Do NOT apply to source code (file) names matching this value.

String doNotApplyToFilesMatching

Do NOT apply to source code (file) pathnames matching this regular expression.

 
Method Summary
boolean matches(SourceCode sourceCode)

Return true if all of the criteria specified in this object apply to thw SourceCode.

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

Property Detail

applyToFileNames

String applyToFileNames
Only apply to source code (file) names matching this value. The name may optionally contain a path. If a path is specified, then the source code path must match it. If no path is specified, then only the source code (file) name is compared (i.e., its path is ignored). The value may optionally be a comma-separated list of names, in which case one of the names must match. The name(s) may optionally include wildcard characters ('*' or '?'). If null, then all SourceCode instances match this part of the criteria (i.e., this property is ignored).


applyToFilesMatching

String applyToFilesMatching
Apply only to source code (file) pathnames matching this regular expression. If null, then all SourceCode instances match this part of the criteria (i.e., this property is ignored).


doNotApplyToFileNames

String doNotApplyToFileNames
Do NOT apply to source code (file) names matching this value. The name may optionally contain a path. If a path is specified, then the source code path must match it. If no path is specified, then only the source code (file) name is compared (i.e., its path is ignored). The value may optionally be a comma-separated list of names, in which case any one of the names can match. The name(s) may optionally include wildcard characters ('*' or '?'). If null, then all SourceCode instances match this part of the criteria (i.e., this property is ignored).


doNotApplyToFilesMatching

String doNotApplyToFilesMatching
Do NOT apply to source code (file) pathnames matching this regular expression. If null, then all SourceCode instances match this part of the criteria (i.e., this property is ignored).


 
Method Detail

matches

boolean matches(SourceCode sourceCode)
Return true if all of the criteria specified in this object apply to thw SourceCode.
Parameters:
sourceCode - - the SourceCode
Returns:
true only if all of the (specified, i.e. non-null) criteria match the SourceCode


 

Groovy Documentation