Package org.codenarc.rule.size
Class GMetricsSourceCodeAdapter
- java.lang.Object
-
- org.codenarc.rule.size.GMetricsSourceCodeAdapter
-
- All Implemented Interfaces:
groovy.lang.GroovyObject,org.gmetrics.source.SourceCode
public class GMetricsSourceCodeAdapter extends Object implements org.gmetrics.source.SourceCode, groovy.lang.GroovyObject
-
-
Constructor Summary
Constructors Constructor Description GMetricsSourceCodeAdapter(SourceCode sourceCode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.codehaus.groovy.ast.ModuleNodegetAst()intgetLineNumberForCharacterIndex(int charIndex)ListgetLines()groovy.lang.MetaClassgetMetaClass()StringgetName()StringgetPath()ObjectgetProperty(String property)StringgetText()ObjectinvokeMethod(String method, Object arguments)booleanisValid()Stringline(int lineNumber)voidsetMetaClass(groovy.lang.MetaClass mc)voidsetProperty(String property, Object value)
-
-
-
Constructor Detail
-
GMetricsSourceCodeAdapter
public GMetricsSourceCodeAdapter(SourceCode sourceCode)
-
-
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
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.gmetrics.source.SourceCode
-
getPath
public String getPath()
- Specified by:
getPathin interfaceorg.gmetrics.source.SourceCode
-
getText
public String getText()
- Specified by:
getTextin interfaceorg.gmetrics.source.SourceCode
-
getLines
public List getLines()
- Specified by:
getLinesin interfaceorg.gmetrics.source.SourceCode
-
line
public String line(int lineNumber)
- Specified by:
linein interfaceorg.gmetrics.source.SourceCode
-
getAst
public org.codehaus.groovy.ast.ModuleNode getAst()
- Specified by:
getAstin interfaceorg.gmetrics.source.SourceCode
-
getLineNumberForCharacterIndex
public int getLineNumberForCharacterIndex(int charIndex)
- Specified by:
getLineNumberForCharacterIndexin interfaceorg.gmetrics.source.SourceCode
-
isValid
public boolean isValid()
- Specified by:
isValidin interfaceorg.gmetrics.source.SourceCode
-
-