|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gmetrics.source.AbstractSourceCode
public abstract class AbstractSourceCode
Abstract superclass for SourceCode implementations
| Constructor Summary | |
|---|---|
AbstractSourceCode()
|
|
| Method Summary | |
|---|---|
protected abstract java.lang.Object |
createSourceUnit()
|
org.codehaus.groovy.ast.ModuleNode |
getAst()
Return the Groovy AST (Abstract Syntax Tree) for this source file |
static java.lang.Object |
getFILE_SEPARATOR()
|
int |
getLineNumberForCharacterIndex(int charIndex)
Return the line index for the line containing the character at the specified index within the source code. |
java.util.List |
getLines()
|
static java.lang.Object |
getLOG()
|
groovy.lang.MetaClass |
getMetaClass()
|
java.lang.Object |
getProperty(java.lang.String name)
|
java.lang.Object |
invokeMethod(java.lang.String name,
java.lang.Object args)
|
java.lang.String |
line(int lineNumber)
Get the trimmed line at the specified index |
protected java.lang.String |
normalizePath(java.lang.String path)
Return the normalized value of the specified path. |
void |
setMetaClass(groovy.lang.MetaClass metaClass)
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gmetrics.source.SourceCode |
|---|
getName, getPath, getText |
| Constructor Detail |
|---|
public AbstractSourceCode()
| Method Detail |
|---|
public static final java.lang.Object getLOG()
public static final java.lang.Object getFILE_SEPARATOR()
protected abstract java.lang.Object createSourceUnit()
public java.util.List getLines()
getLines in interface SourceCodepublic java.lang.String line(int lineNumber)
line in interface SourceCodelineNumber - - the line number; may be negative
public org.codehaus.groovy.ast.ModuleNode getAst()
getAst in interface SourceCodepublic int getLineNumberForCharacterIndex(int charIndex)
getLineNumberForCharacterIndex in interface SourceCodecharIndex - - the index of the character within the source code (zero-based)
protected java.lang.String normalizePath(java.lang.String path)
path - - the path to normalize
public groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass metaClass)
setMetaClass in interface groovy.lang.GroovyObject
public java.lang.Object invokeMethod(java.lang.String name,
java.lang.Object args)
invokeMethod in interface groovy.lang.GroovyObjectpublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface groovy.lang.GroovyObject
public void setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface groovy.lang.GroovyObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||