Package: groovy.org.codenarc.source

## [Groovy] Class SourceFile

- groovy.org.codenarc.source.SourceFile

- The SourceCode implementation for a single file. Note that the path is normalized: file separator chars are normalized to standard '/'.

  Authors:
    Chris Mair

- - ### Constructor Summary

    Constructors
    Constructor and description
    `SourceFile (File file)` Construct a new instance for the file at the specified path

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `String` | `getName()` @return the filename for this source file, excluding path
    `` | `String` | `getPath()` @return the normalized path for this source file, including filename
    `` | `String` | `getText()` @return the full text of the source code
    `` | `String` | `toString()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractSourceCode` | `getAst, getAstCompilerPhase, getLineNumberForCharacterIndex, getLines, getMethodCallExpressions, isValid, line, normalizePath, setSuppressionAnalyzer`

- - ### Constructor Detail

    - #### SourceFile(File file)

      Construct a new instance for the file at the specified path

      Parameters:
        `path` - - the path of the file; must not be null or empty

  - ### Method Detail

    - #### String getName()

      Returns:
        the filename for this source file, excluding path

    - #### String getPath()

      Returns:
        the normalized path for this source file, including filename

    - #### String getText()

      Returns:
        the full text of the source code

    - #### String toString()