@SuppressWarnings('AbstractClassWithoutAbstractMethod') abstract class AbstractSourceCode
Abstract superclass for SourceCode implementations
Type | Name and description |
---|---|
static def |
LOG |
static def |
SEPARATOR_PROP |
SuppressionAnalyzer |
suppressionAnalyzer |
Type Params | Return Type | Name and description |
---|---|---|
|
org.codehaus.groovy.ast.ModuleNode |
getAst() Return the Groovy AST (Abstract Syntax Tree) for this source file |
|
int |
getAstCompilerPhase() @return compiler phase (as in org.codehaus.groovy.control.Phases) up to which the AST will be processed |
|
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) |
|
Map<org.codehaus.groovy.ast.ClassNode, List<org.codehaus.groovy.ast.expr.MethodCallExpression>> |
getMethodCallExpressions() |
|
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. |
|
protected void |
setSuppressionAnalyzer(SuppressionAnalyzer suppressionAnalyzer) Setter exists to avoid circular dependency. |
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 zero-based line number; may be negativeReturn the normalized value of the specified path. Convert file separator chars to standard '/'.
path
- - the path to normalizeSetter exists to avoid circular dependency.
suppressionAnalyzer
- suppression analyzer