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 -
Method Summary
Modifier and TypeMethodDescriptionorg.codehaus.groovy.ast.ModuleNode
getAst()
int
int
getLineNumberForCharacterIndex
(int charIndex) getLines()
static org.slf4j.Logger
getLOG()
groovy.lang.MetaClass
getProperty
(String property) static String
invokeMethod
(String method, Object arguments) boolean
isValid()
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 Details
-
AbstractSourceCode
public AbstractSourceCode()
-
-
Method Details
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()- Specified by:
getMetaClass
in interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc) - Specified by:
setMetaClass
in interfacegroovy.lang.GroovyObject
-
invokeMethod
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
-
getProperty
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
getLOG
public static org.slf4j.Logger getLOG() -
getSEPARATOR_PROP
-
getSuppressionAnalyzer
- Specified by:
getSuppressionAnalyzer
in interfaceSourceCode
-
setSuppressionAnalyzer
-
getLines
- Specified by:
getLines
in interfaceSourceCode
-
line
- Specified by:
line
in interfaceSourceCode
-
getAst
public org.codehaus.groovy.ast.ModuleNode getAst()- Specified by:
getAst
in interfaceSourceCode
-
getAstCompilerPhase
public int getAstCompilerPhase()- Specified by:
getAstCompilerPhase
in interfaceSourceCode
-
getMethodCallExpressions
public Map<org.codehaus.groovy.ast.ClassNode,List<org.codehaus.groovy.ast.expr.MethodCallExpression>> getMethodCallExpressions()- Specified by:
getMethodCallExpressions
in interfaceSourceCode
-
getLineNumberForCharacterIndex
public int getLineNumberForCharacterIndex(int charIndex) - Specified by:
getLineNumberForCharacterIndex
in interfaceSourceCode
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceSourceCode
-
normalizePath
-