java.lang.Object
edu.hm.hafner.analysis.parser.dry.cpd.Duplication
Java Bean class for a CPD duplication.
- Autor:
- Ullrich Hafner
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddFile(SourceFile file) Adds a new file to this duplication.Returns the duplicate code fragment.getFiles()Returns all files of the duplication.intgetLines()Returns the number of duplicate lines.intReturns the number of duplicate tokens.voidsetCodeFragment(String codeFragment) Sets the duplicate code fragment to the specified value.voidsetLines(int lines) Sets the number of duplicate lines to the specified value.voidsetTokens(int tokens) Sets the number of duplicate tokens to the specified value.
-
Konstruktordetails
-
Duplication
public Duplication()
-
-
Methodendetails
-
addFile
Adds a new file to this duplication.- Parameter:
file- the new file
-
getFiles
Returns all files of the duplication. The returned collection is read-only.- Gibt zurück:
- all files
-
getLines
public int getLines()Returns the number of duplicate lines.- Gibt zurück:
- the lines
-
setLines
public void setLines(int lines) Sets the number of duplicate lines to the specified value.- Parameter:
lines- the value to set
-
getTokens
public int getTokens()Returns the number of duplicate tokens.- Gibt zurück:
- the tokens
-
setTokens
public void setTokens(int tokens) Sets the number of duplicate tokens to the specified value.- Parameter:
tokens- the value to set
-
getCodeFragment
Returns the duplicate code fragment.- Gibt zurück:
- the duplicate code fragment
-
setCodeFragment
Sets the duplicate code fragment to the specified value.- Parameter:
codeFragment- the value to set
-