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 Objectorg.codehaus.groovy.ast.ModuleNodegetAst()static ObjectintgetLineNumberForCharacterIndex(int charIndex) getLines()static ObjectgetLOG()groovy.lang.MetaClassgetProperty(String property) invokeMethod(String method, Object arguments) booleanisValid()line(int lineNumber) protected StringnormalizePath(String path) voidsetMetaClass(groovy.lang.MetaClass mc) voidsetProperty(String property, Object value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getMetaClassin interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc) - Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject
-
invokeMethod
- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject
-
getProperty
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject
-
setProperty
- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject
-
getLOG
-
getFILE_SEPARATOR
-
createSourceUnit
-
getLines
- Specified by:
getLinesin interfaceSourceCode
-
line
- Specified by:
linein interfaceSourceCode
-
getAst
public org.codehaus.groovy.ast.ModuleNode getAst()- Specified by:
getAstin interfaceSourceCode
-
getLineNumberForCharacterIndex
public int getLineNumberForCharacterIndex(int charIndex) - Specified by:
getLineNumberForCharacterIndexin interfaceSourceCode
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceSourceCode
-
normalizePath
-