org.sonar.batch
Class DefaultFileLinesContext

java.lang.Object
  extended by org.sonar.batch.DefaultFileLinesContext
All Implemented Interfaces:
FileLinesContext

@Beta
public class DefaultFileLinesContext
extends Object
implements FileLinesContext

Since:
2.14

Constructor Summary
DefaultFileLinesContext(SonarIndex index, Resource resource)
           
 
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)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultFileLinesContext

public DefaultFileLinesContext(SonarIndex index,
                               Resource resource)
Method Detail

setIntValue

public void setIntValue(String metricKey,
                        int line,
                        int value)
Specified by:
setIntValue in interface FileLinesContext

getIntValue

public Integer getIntValue(String metricKey,
                           int line)
Specified by:
getIntValue in interface FileLinesContext
Returns:
value, or null if no such metric for given line

setStringValue

public void setStringValue(String metricKey,
                           int line,
                           String value)
Specified by:
setStringValue in interface FileLinesContext

getStringValue

public String getStringValue(String metricKey,
                             int line)
Specified by:
getStringValue in interface FileLinesContext
Returns:
value, or null if no such metric for given line

save

public void save()
Description copied from interface: FileLinesContext
Saves unsaved values.

Specified by:
save in interface FileLinesContext

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012 SonarSource. All Rights Reserved.