org.codenarc.source
Class AbstractSourceCode

java.lang.Object
  extended by org.codenarc.source.AbstractSourceCode
All Implemented Interfaces:
groovy.lang.GroovyObject, SourceCode
Direct Known Subclasses:
SourceFile, SourceString

public abstract class AbstractSourceCode
extends java.lang.Object
implements SourceCode, groovy.lang.GroovyObject


Constructor Summary
AbstractSourceCode()
           
 
Method Summary
 org.codehaus.groovy.ast.ModuleNode getAst()
           
static java.lang.Object getFILE_SEPARATOR()
           
 int getLineNumberForCharacterIndex(int charIndex)
           
 java.util.List getLines()
           
static java.lang.Object getLOG()
           
 groovy.lang.MetaClass getMetaClass()
           
 java.lang.Object getProperty(java.lang.String property)
           
static java.lang.Object getSEPARATOR_PROP()
           
 java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
           
 boolean isValid()
           
 java.lang.String line(int lineNumber)
           
protected  java.lang.String normalizePath(java.lang.String path)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(java.lang.String property, 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.codenarc.source.SourceCode
getName, getPath, getText
 

Constructor Detail

AbstractSourceCode

public AbstractSourceCode()
Method Detail

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 java.lang.Object invokeMethod(java.lang.String method,
                                     java.lang.Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

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

setProperty

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

getLOG

public static java.lang.Object getLOG()

getSEPARATOR_PROP

public static java.lang.Object getSEPARATOR_PROP()

getFILE_SEPARATOR

public static java.lang.Object getFILE_SEPARATOR()

getLines

public java.util.List getLines()
Specified by:
getLines in interface SourceCode

line

public java.lang.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 java.lang.String normalizePath(java.lang.String path)


Copyright © 2011. All Rights Reserved.