Package org.codenarc.source
Class AbstractSourceCode
- java.lang.Object
-
- 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
Constructors Constructor Description AbstractSourceCode()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.codehaus.groovy.ast.ModuleNodegetAst()intgetAstCompilerPhase()intgetLineNumberForCharacterIndex(int charIndex)ListgetLines()static org.slf4j.LoggergetLOG()groovy.lang.MetaClassgetMetaClass()Map<org.codehaus.groovy.ast.ClassNode,List<org.codehaus.groovy.ast.expr.MethodCallExpression>>getMethodCallExpressions()ObjectgetProperty(String property)static StringgetSEPARATOR_PROP()SuppressionAnalyzergetSuppressionAnalyzer()ObjectinvokeMethod(String method, Object arguments)booleanisValid()Stringline(int lineNumber)protected StringnormalizePath(String path)voidsetMetaClass(groovy.lang.MetaClass mc)voidsetProperty(String property, Object value)protected voidsetSuppressionAnalyzer(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
-
-
-
-
Method Detail
-
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
public Object invokeMethod(String method, Object arguments)
- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject
-
getProperty
public Object getProperty(String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(String property, Object value)
- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject
-
getLOG
public static org.slf4j.Logger getLOG()
-
getSEPARATOR_PROP
public static String getSEPARATOR_PROP()
-
getSuppressionAnalyzer
public SuppressionAnalyzer getSuppressionAnalyzer()
- Specified by:
getSuppressionAnalyzerin interfaceSourceCode
-
setSuppressionAnalyzer
protected void setSuppressionAnalyzer(SuppressionAnalyzer suppressionAnalyzer)
-
getLines
public List getLines()
- Specified by:
getLinesin interfaceSourceCode
-
line
public String line(int lineNumber)
- Specified by:
linein interfaceSourceCode
-
getAst
public org.codehaus.groovy.ast.ModuleNode getAst()
- Specified by:
getAstin interfaceSourceCode
-
getAstCompilerPhase
public int getAstCompilerPhase()
- Specified by:
getAstCompilerPhasein interfaceSourceCode
-
getMethodCallExpressions
public Map<org.codehaus.groovy.ast.ClassNode,List<org.codehaus.groovy.ast.expr.MethodCallExpression>> getMethodCallExpressions()
- Specified by:
getMethodCallExpressionsin interfaceSourceCode
-
getLineNumberForCharacterIndex
public int getLineNumberForCharacterIndex(int charIndex)
- Specified by:
getLineNumberForCharacterIndexin interfaceSourceCode
-
isValid
public boolean isValid()
- Specified by:
isValidin interfaceSourceCode
-
-