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 java.lang.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.ModuleNode
getAst()
int
getAstCompilerPhase()
int
getLineNumberForCharacterIndex(int charIndex)
java.util.List
getLines()
static org.slf4j.Logger
getLOG()
groovy.lang.MetaClass
getMetaClass()
java.util.Map<org.codehaus.groovy.ast.ClassNode,java.util.List<org.codehaus.groovy.ast.expr.MethodCallExpression>>
getMethodCallExpressions()
java.lang.Object
getProperty(java.lang.String property)
static java.lang.String
getSEPARATOR_PROP()
SuppressionAnalyzer
getSuppressionAnalyzer()
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)
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
-
-
-
-
Method Detail
-
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
public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
-
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
getLOG
public static org.slf4j.Logger getLOG()
-
getSEPARATOR_PROP
public static java.lang.String getSEPARATOR_PROP()
-
getSuppressionAnalyzer
public SuppressionAnalyzer getSuppressionAnalyzer()
- Specified by:
getSuppressionAnalyzer
in interfaceSourceCode
-
setSuppressionAnalyzer
protected void setSuppressionAnalyzer(SuppressionAnalyzer suppressionAnalyzer)
-
getLines
public java.util.List getLines()
- Specified by:
getLines
in interfaceSourceCode
-
line
public java.lang.String line(int lineNumber)
- 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 java.util.Map<org.codehaus.groovy.ast.ClassNode,java.util.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
protected java.lang.String normalizePath(java.lang.String path)
-
-