|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.org.codenarc.source.AbstractSourceCode
groovy.org.codenarc.source.SourceFile
class SourceFile extends AbstractSourceCode
The SourceCode implementation for a single file. Note that the path is normalized: file separator chars are normalized to standard '/'.
Constructor Summary | |
SourceFile(File file)
Construct a new instance for the file at the specified path |
Method Summary | |
---|---|
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()
|
Methods inherited from class AbstractSourceCode | |
---|---|
getAst, getLineNumberForCharacterIndex, getLines, getMethodCallExpressions, isValid, line, normalizePath, setSuppressionAnalyzer |
Constructor Detail |
---|
SourceFile(File file)
path
- - the path of the file; must not be null or empty
Method Detail |
---|
String getName()
String getPath()
String getText()
String toString()
Groovy Documentation