org.sonar.api.measures
Interface FileLinesContext


public interface FileLinesContext

Provides facility to store measures for the lines of file. Examples:

Numbering of lines starts from 1. Also note that you can't update what already was saved, however it is safe to call save() several times.

Instances of this interface can be obtained using FileLinesContextFactory.

This interface is not intended to be implemented by clients.

Since:
2.14

Method Summary
 Integer getIntValue(String metricKey, int line)
          Deprecated. since 5.0 sensors should not read data
 String getStringValue(String metricKey, int line)
          Deprecated. since 5.0 sensors should not read data
 void save()
          Saves unsaved values.
 void setIntValue(String metricKey, int line, int value)
           
 void setStringValue(String metricKey, int line, String value)
           
 

Method Detail

setIntValue

void setIntValue(String metricKey,
                 int line,
                 int value)
Throws:
UnsupportedOperationException - on attempt to update already saved data

getIntValue

@Deprecated
Integer getIntValue(String metricKey,
                               int line)
Deprecated. since 5.0 sensors should not read data

Returns:
value, or null if no such metric for given line

setStringValue

void setStringValue(String metricKey,
                    int line,
                    String value)
Throws:
UnsupportedOperationException - on attempt to update already saved data

getStringValue

@Deprecated
String getStringValue(String metricKey,
                                 int line)
Deprecated. since 5.0 sensors should not read data

Returns:
value, or null if no such metric for given line

save

void save()
Saves unsaved values.



Copyright © 2009–2015 SonarSource. All rights reserved.