|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.org.codenarc.util.SourceCodeUtil
class SourceCodeUtil
Contains source related static utility methods
Method Summary | |
---|---|
static List
|
nodeSourceLines(SourceCode source, org.codehaus.groovy.ast.ASTNode node)
|
static List
|
sourceLinesBetween(SourceCode source, int startLine, int startColumn, int endLine, int endColumn)
Retrieves source lines between the start line and column and end line and column. |
static List
|
sourceLinesBetweenNodes(SourceCode source, org.codehaus.groovy.ast.ASTNode startNode, org.codehaus.groovy.ast.ASTNode endNode)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail |
---|
static List nodeSourceLines(SourceCode source, org.codehaus.groovy.ast.ASTNode node)
static List sourceLinesBetween(SourceCode source, int startLine, int startColumn, int endLine, int endColumn)
source
- Source from which the lines are to be extractedstartLine
- has to be greater than zerostartColumn
- has to be greater than zeroendLine
- has to be greater than zeroendColumn
- has to be greater than zero
static List sourceLinesBetweenNodes(SourceCode source, org.codehaus.groovy.ast.ASTNode startNode, org.codehaus.groovy.ast.ASTNode endNode)
Groovy Documentation