abstract class AbstractSourceCode
Abstract superclass for SourceCode implementations
Type | Name and description |
---|---|
static def |
FILE_SEPARATOR |
static def |
LOG |
Type Params | Return Type | Name and description |
---|---|---|
|
protected def |
createSourceUnit() |
|
org.codehaus.groovy.ast.ModuleNode |
getAst() Return the Groovy AST (Abstract Syntax Tree) for this source file |
|
int |
getLineNumberForCharacterIndex(int charIndex) Return the line index for the line containing the character at the specified index within the source code. |
|
List |
getLines() @return the List of lines of the source code (with line terminators removed) |
|
boolean |
isValid() Return true if and only if the source code can be successfully compiled |
|
String |
line(int lineNumber) Get the trimmed line at the specified index |
|
protected String |
normalizePath(String path) Return the normalized value of the specified path. |
Return the Groovy AST (Abstract Syntax Tree) for this source file
Return the line index for the line containing the character at the specified index within the source code.
charIndex
- - the index of the character within the source code (zero-based)
Return true if and only if the source code can be successfully compiled
Get the trimmed line at the specified index
lineNumber
- - the line number; may be negative