Package: groovy.org.codenarc.source

## [Groovy] Class SourceCodeCriteria

- groovy.org.codenarc.source.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

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `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.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `boolean` | `matches(SourceCode sourceCode)` Return true if all of the criteria specified in this object apply to thw SourceCode.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Property Detail

    - #### 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).

    - #### 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).

    - #### 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).

    - #### 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

    - #### 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