public abstract class SourceCode extends Object implements Measurable, Comparable<SourceCode>
Constructor and Description |
---|
SourceCode(String key) |
SourceCode(String key,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
add(MetricDef metric,
double value) |
void |
add(MetricDef metric,
SourceCode child) |
SourceCode |
addChild(SourceCode sourceCode) |
void |
addData(MetricDef metric,
Object data) |
int |
compareTo(SourceCode resource) |
boolean |
equals(Object obj) |
<SOURCECODE extends SourceCode> |
getAncestor(Class<SOURCECODE> withClass) |
Set<CheckMessage> |
getCheckMessages() |
Set<SourceCode> |
getChildren() |
Object |
getData(Metric metric)
Deprecated.
since 2.1. It's replaced by getData(MetricDef). It's still defined for binary compatibility.
|
Object |
getData(MetricDef metric) |
double |
getDouble(Metric metric)
Deprecated.
since 2.1. It's replaced by getDouble(MetricDef). It's still defined for binary compatibility.
|
double |
getDouble(MetricDef metric) |
int |
getEndAtLine() |
SourceCode |
getFirstChild() |
int |
getInt(Metric metric)
Deprecated.
since 2.1. It's replaced by getInt(MetricDef). It's still defined for binary compatibility.
|
int |
getInt(MetricDef metric) |
String |
getKey() |
SourceCode |
getLastChild() |
String |
getName() |
SourceCode |
getParent() |
<SOURCECODE extends SourceCode> |
getParent(Class<SOURCECODE> sourceCode) |
int |
getStartAtLine() |
boolean |
hasAmongParents(SourceCode expectedParent) |
boolean |
hasCheckMessages() |
boolean |
hasChild(SourceCode squidUnit) |
boolean |
hasChildren() |
int |
hashCode() |
boolean |
isType(Class<? extends SourceCode> resourceType) |
void |
log(CheckMessage message) |
void |
removeMeasure(MetricDef metric) |
void |
setEndAtLine(int endAtLine) |
void |
setMeasure(MetricDef metric,
double measure) |
void |
setMeasure(MetricDef metric,
int measure) |
void |
setSourceCodeIndexer(SourceCodeIndexer indexer) |
void |
setStartAtLine(int startAtLine) |
String |
toString() |
public SourceCode(String key)
public SourceCode(String key, String name)
public int compareTo(SourceCode resource)
compareTo
in interface Comparable<SourceCode>
public final void setSourceCodeIndexer(SourceCodeIndexer indexer)
public boolean isType(Class<? extends SourceCode> resourceType)
public int getInt(MetricDef metric)
getInt
in interface Measurable
@Deprecated public int getInt(Metric metric)
public double getDouble(MetricDef metric)
getDouble
in interface Measurable
@Deprecated public double getDouble(Metric metric)
public void add(MetricDef metric, SourceCode child)
@Deprecated public Object getData(Metric metric)
public void setMeasure(MetricDef metric, double measure)
setMeasure
in interface Measurable
public void setMeasure(MetricDef metric, int measure)
setMeasure
in interface Measurable
public void removeMeasure(MetricDef metric)
public void setStartAtLine(int startAtLine)
public void setEndAtLine(int endAtLine)
public int getStartAtLine()
public int getEndAtLine()
public SourceCode addChild(SourceCode sourceCode)
public <SOURCECODE extends SourceCode> SOURCECODE getParent(Class<SOURCECODE> sourceCode)
public <SOURCECODE extends SourceCode> SOURCECODE getAncestor(Class<SOURCECODE> withClass)
public void log(CheckMessage message)
public Set<CheckMessage> getCheckMessages()
public boolean hasCheckMessages()
public SourceCode getFirstChild()
public SourceCode getLastChild()
public SourceCode getParent()
public Set<SourceCode> getChildren()
public boolean hasChild(SourceCode squidUnit)
public boolean hasChildren()
public boolean hasAmongParents(SourceCode expectedParent)
Copyright © 2009-2012 SonarSource. All Rights Reserved.