org.codenarc.source
Class AbstractSourceCode

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

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


Field Summary
 
Fields inherited from interface org.codenarc.source.SourceCode
DEFAULT_COMPILER_PHASE
 
Constructor Summary
AbstractSourceCode()
           
 
Method Summary
 org.codehaus.groovy.ast.ModuleNode getAst()
           
 int getAstCompilerPhase()
           
 int getLineNumberForCharacterIndex(int charIndex)
           
 List getLines()
           
static Object getLOG()
           
 groovy.lang.MetaClass getMetaClass()
           
 Map<org.codehaus.groovy.ast.ClassNode,List<org.codehaus.groovy.ast.expr.MethodCallExpression>> getMethodCallExpressions()
           
 Object getProperty(String property)
           
static Object getSEPARATOR_PROP()
           
 SuppressionAnalyzer getSuppressionAnalyzer()
           
 Object invokeMethod(String method, Object arguments)
           
 boolean isValid()
           
 String line(int lineNumber)
           
protected  String normalizePath(String path)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(String property, Object value)
           
protected  void setSuppressionAnalyzer(SuppressionAnalyzer suppressionAnalyzer)
           
 
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 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()

getSEPARATOR_PROP

public static Object getSEPARATOR_PROP()

getSuppressionAnalyzer

public SuppressionAnalyzer getSuppressionAnalyzer()
Specified by:
getSuppressionAnalyzer in interface SourceCode

setSuppressionAnalyzer

protected void setSuppressionAnalyzer(SuppressionAnalyzer suppressionAnalyzer)

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

getAstCompilerPhase

public int getAstCompilerPhase()
Specified by:
getAstCompilerPhase in interface SourceCode

getMethodCallExpressions

public Map<org.codehaus.groovy.ast.ClassNode,List<org.codehaus.groovy.ast.expr.MethodCallExpression>> getMethodCallExpressions()
Specified by:
getMethodCallExpressions 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)


Copyright © 2014. All rights reserved.