org.sonar.api.measures
Interface FileLinesContext

All Known Implementing Classes:
DefaultFileLinesContext

@Beta
public interface FileLinesContext

Provides access to 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)
           
 String getStringValue(String metricKey, int line)
           
 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

Integer getIntValue(String metricKey,
                    int line)
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

String getStringValue(String metricKey,
                      int line)
Returns:
value, or null if no such metric for given line

save

void save()
Saves unsaved values.



Copyright © 2009-2012 SonarSource. All Rights Reserved.