|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
interface SourceCode
Represents a unit of source code to be analyzed
Method Summary | |
---|---|
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) |
String
|
getName()
Get the logical name for this source code. |
String
|
getPath()
Get the logical path for this source code. |
String
|
getText()
@return the full text of the source code |
String
|
line(int lineNumber)
Get the trimmed line at the specified index |
Method Detail |
---|
org.codehaus.groovy.ast.ModuleNode getAst()
int getLineNumberForCharacterIndex(int charIndex)
charIndex
- - the index of the character within the source code (zero-based)
List getLines()
String getName()
String getPath()
String getText()
String line(int lineNumber)
lineNumber
- - the line number; may be negative
Groovy Documentation