|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonar.duplications.block.Block
public final class Block
Represents part of source code between two lines.
If two blocks have the same hash, then we assume that there is a duplication in a code, which they represent.
| Nested Class Summary | |
|---|---|
static class |
Block.Builder
Instances can be reused - it is safe to call Block.Builder.build()
multiple times to build multiple blocks in series. |
| Method Summary | |
|---|---|
static Block.Builder |
builder()
|
boolean |
equals(Object obj)
|
ByteArray |
getBlockHash()
|
int |
getEndLine()
Number of line where fragment ends. |
int |
getEndUnit()
|
String |
getHashHex()
|
int |
getIndexInFile()
|
String |
getResourceId()
|
int |
getStartLine()
Number of line where fragment starts. |
int |
getStartUnit()
|
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Block.Builder builder()
public String getHashHex()
public String getResourceId()
public ByteArray getBlockHash()
public int getIndexInFile()
public int getStartLine()
CodeFragment
getStartLine in interface CodeFragmentpublic int getEndLine()
CodeFragment
getEndLine in interface CodeFragment@Beta public int getStartUnit()
@Beta public int getEndUnit()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||