Package org.gmetrics.source
Class AbstractSourceCode
java.lang.Object
org.gmetrics.source.AbstractSourceCode
- All Implemented Interfaces:
groovy.lang.GroovyObject
,SourceCode
- Direct Known Subclasses:
SourceFile
,SourceString
public abstract class AbstractSourceCode
extends Object
implements SourceCode, groovy.lang.GroovyObject
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object
org.codehaus.groovy.ast.ModuleNode
getAst()
static Object
int
getLineNumberForCharacterIndex
(int charIndex) getLines()
static Object
getLOG()
groovy.lang.MetaClass
getProperty
(String property) invokeMethod
(String method, Object arguments) boolean
isValid()
line
(int lineNumber) protected String
normalizePath
(String path) void
setMetaClass
(groovy.lang.MetaClass mc) void
setProperty
(String property, 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 Details
-
AbstractSourceCode
public AbstractSourceCode()
-
-
Method Details
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()- Specified by:
getMetaClass
in interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc) - Specified by:
setMetaClass
in interfacegroovy.lang.GroovyObject
-
invokeMethod
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
-
getProperty
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
getLOG
-
getFILE_SEPARATOR
-
createSourceUnit
-
getLines
- Specified by:
getLines
in interfaceSourceCode
-
line
- Specified by:
line
in interfaceSourceCode
-
getAst
public org.codehaus.groovy.ast.ModuleNode getAst()- Specified by:
getAst
in interfaceSourceCode
-
getLineNumberForCharacterIndex
public int getLineNumberForCharacterIndex(int charIndex) - Specified by:
getLineNumberForCharacterIndex
in interfaceSourceCode
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceSourceCode
-
normalizePath
-