Class DefaultSignificantCode
- java.lang.Object
-
- org.sonar.api.batch.sensor.internal.DefaultStorable
-
- org.sonar.api.batch.sensor.code.internal.DefaultSignificantCode
-
- All Implemented Interfaces:
NewSignificantCode
public class DefaultSignificantCode extends DefaultStorable implements NewSignificantCode
-
-
Field Summary
-
Fields inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
storage
-
-
Constructor Summary
Constructors Constructor Description DefaultSignificantCode()
DefaultSignificantCode(SensorStorage storage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultSignificantCode
addRange(TextRange range)
Add a range of significant code.protected void
doSave()
InputFile
inputFile()
DefaultSignificantCode
onFile(InputFile inputFile)
The file for which significant code is being reported.java.util.SortedMap<java.lang.Integer,TextRange>
significantCodePerLine()
-
Methods inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
save, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.api.batch.sensor.code.NewSignificantCode
save
-
-
-
-
Constructor Detail
-
DefaultSignificantCode
public DefaultSignificantCode()
-
DefaultSignificantCode
public DefaultSignificantCode(@Nullable SensorStorage storage)
-
-
Method Detail
-
onFile
public DefaultSignificantCode onFile(InputFile inputFile)
Description copied from interface:NewSignificantCode
The file for which significant code is being reported. This field must be set before saving the error.- Specified by:
onFile
in interfaceNewSignificantCode
-
addRange
public DefaultSignificantCode addRange(TextRange range)
Description copied from interface:NewSignificantCode
Add a range of significant code. The range may only include a single line and only one range is accepted per line.- Specified by:
addRange
in interfaceNewSignificantCode
-
doSave
protected void doSave()
- Specified by:
doSave
in classDefaultStorable
-
inputFile
public InputFile inputFile()
-
significantCodePerLine
public java.util.SortedMap<java.lang.Integer,TextRange> significantCodePerLine()
-
-