The SourceCode implementation for a single file. Note that the path is normalized: file separator chars are normalized to standard '/'.
Constructor and description |
---|
SourceFile
(File file) Construct a new instance for the file at the specified path |
Type | Name and description |
---|---|
protected def |
createSourceUnit() |
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 | Name |
---|---|
class AbstractSourceCode |
createSourceUnit, getAst, getLineNumberForCharacterIndex, getLines, isValid, line, normalizePath |
Construct a new instance for the file at the specified path
path
- - the path of the file; must not be null or empty