|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.plugins.dry.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 |
---|
Fields inherited from class hudson.plugins.dry.util.model.AbstractAnnotation |
---|
WORKSPACE_FILES |
Constructor Summary | |
---|---|
DuplicateCode(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. |
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. |
int |
getNumberOfLines()
Returns the total number of duplicate lines. |
java.lang.String |
getSourceCode()
Returns the duplicate source code fragment. |
java.lang.String |
getToolTip()
Returns the a detailed description that will be used as tooltip. |
int |
hashCode()
|
int |
length()
Returns the total number of duplicate lines. |
void |
linkTo(java.util.ArrayList<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.dry.util.model.AbstractAnnotation |
---|
addLineRange, canDisplayFile, compareTo, getCategory, getFileName, getKey, getLineRanges, getMessage, getModuleName, getPackageName, getPrimaryLineNumber, getPriority, getShortFileName, getTempName, getType, hasPackageName, setFileName, setModuleName, setPackageName, setPriority |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DuplicateCode(int firstLine, int numberOfLines, java.lang.String fileName)
DuplicateCode
.
firstLine
- the starting line of the duplicationnumberOfLines
- total number of duplicate linesfileName
- name of the file that contains the duplicationMethod Detail |
---|
public int getNumberOfLines()
public int size()
public int length()
public java.lang.String getToolTip()
public void linkTo(java.util.ArrayList<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 AbstractAnnotation
public boolean equals(java.lang.Object obj)
equals
in class AbstractAnnotation
public 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 |