|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.codenarc.source.AbstractSourceCode
@SuppressWarnings('AbstractClassWithoutAbstractMethod') abstract class AbstractSourceCode
Abstract superclass for SourceCode implementations
Property Summary | |
---|---|
static def |
FILE_SEPARATOR
|
static def |
LOG
|
static def |
SEPARATOR_PROP
|
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) |
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. |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Property Detail |
---|
static final def FILE_SEPARATOR
static final def LOG
static final def SEPARATOR_PROP
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()
boolean isValid()
String line(int lineNumber)
lineNumber
- - the zero-based line number; may be negative
protected String normalizePath(String path)
path
- - the path to normalize
Groovy Documentation