|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.analysis.util.model.AbstractAnnotation
hudson.plugins.dry.parser.DuplicateCode
public class DuplicateCode
A serializable Java Bean class representing a duplicate code warning.
Note: this class has a natural ordering that is inconsistent with equals.
| Field Summary | |
|---|---|
static java.lang.String |
ORIGIN
Origin of the annotation. |
| Fields inherited from class hudson.plugins.analysis.util.model.AbstractAnnotation |
|---|
WORKSPACE_FILES |
| Constructor Summary | |
|---|---|
DuplicateCode(hudson.plugins.analysis.util.model.Priority priority,
int firstLine,
int numberOfLines,
java.lang.String fileName)
Creates a new instance of DuplicateCode. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getFormattedSourceCode()
Returns the duplicate source code fragment as formatted HTML string. |
hudson.plugins.analysis.util.model.FileAnnotation |
getLink(long linkHashCode)
Returns the link with the specified hash code. |
java.util.Collection<DuplicateCode> |
getLinks()
Returns the links to the duplicated code in other files. |
java.lang.String |
getMessage()
|
int |
getNumberOfLines()
Returns the total number of duplicate lines. |
java.lang.String |
getSourceCode()
Returns the duplicate source code fragment. |
java.lang.String |
getToolTip()
|
java.lang.String |
getType()
|
int |
hashCode()
|
int |
length()
Returns the total number of duplicate lines. |
void |
linkTo(java.util.List<DuplicateCode> codeBlocks)
Creates links to the specified collection of other code blocks. |
void |
setSourceCode(java.lang.String sourceCode)
Sets the duplicate source code fragment to the specified value. |
int |
size()
Returns the total number of duplicate lines. |
| Methods inherited from class hudson.plugins.analysis.util.model.AbstractAnnotation |
|---|
addLineRange, canDisplayFile, compareTo, getCategory, getContextHashCode, getFileName, getKey, getLineRanges, getModuleName, getOrigin, getPackageName, getPrimaryLineNumber, getPriority, getShortFileName, getTempName, hasPackageName, setContextHashCode, setFileName, setModuleName, setOrigin, setPackageName, setPriority |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ORIGIN
| Constructor Detail |
|---|
public DuplicateCode(hudson.plugins.analysis.util.model.Priority priority,
int firstLine,
int numberOfLines,
java.lang.String fileName)
DuplicateCode.
priority - the priority of the warningfirstLine - the starting line of the duplicationnumberOfLines - total number of duplicate linesfileName - name of the file that contains the duplication| Method Detail |
|---|
public java.lang.String getType()
getType in interface hudson.plugins.analysis.util.model.FileAnnotationgetType in class hudson.plugins.analysis.util.model.AbstractAnnotationpublic java.lang.String getMessage()
getMessage in interface hudson.plugins.analysis.util.model.FileAnnotationgetMessage in class hudson.plugins.analysis.util.model.AbstractAnnotationpublic int getNumberOfLines()
public int size()
public int length()
public java.lang.String getToolTip()
public void linkTo(java.util.List<DuplicateCode> codeBlocks)
codeBlocks - the code blocks to links topublic java.util.Collection<DuplicateCode> getLinks()
public java.lang.String getSourceCode()
public java.lang.String getFormattedSourceCode()
public void setSourceCode(java.lang.String sourceCode)
sourceCode - the duplicate code fragmentpublic int hashCode()
hashCode in class hudson.plugins.analysis.util.model.AbstractAnnotationpublic boolean equals(java.lang.Object obj)
equals in class hudson.plugins.analysis.util.model.AbstractAnnotationpublic hudson.plugins.analysis.util.model.FileAnnotation getLink(long linkHashCode)
linkHashCode - the hash code of the linked annotation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||