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 Details

    • AbstractSourceCode

      public AbstractSourceCode()
  • Method Details

    • getMetaClass

      public groovy.lang.MetaClass getMetaClass()
      Specified by:
      getMetaClass in interface groovy.lang.GroovyObject
    • setMetaClass

      public void setMetaClass(groovy.lang.MetaClass mc)
      Specified by:
      setMetaClass in interface groovy.lang.GroovyObject
    • invokeMethod

      public Object invokeMethod(String method, Object arguments)
      Specified by:
      invokeMethod in interface groovy.lang.GroovyObject
    • getProperty

      public Object getProperty(String property)
      Specified by:
      getProperty in interface groovy.lang.GroovyObject
    • setProperty

      public void setProperty(String property, Object value)
      Specified by:
      setProperty in interface groovy.lang.GroovyObject
    • getLOG

      public static Object getLOG()
    • getFILE_SEPARATOR

      public static Object getFILE_SEPARATOR()
    • createSourceUnit

      protected abstract Object createSourceUnit()
    • getLines

      public List getLines()
      Specified by:
      getLines in interface SourceCode
    • line

      public String line(int lineNumber)
      Specified by:
      line in interface SourceCode
    • getAst

      public org.codehaus.groovy.ast.ModuleNode getAst()
      Specified by:
      getAst in interface SourceCode
    • getLineNumberForCharacterIndex

      public int getLineNumberForCharacterIndex(int charIndex)
      Specified by:
      getLineNumberForCharacterIndex in interface SourceCode
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface SourceCode
    • normalizePath

      protected String normalizePath(String path)