hudson.plugins.dry.parser.cpd
Class Duplication

java.lang.Object
  extended by hudson.plugins.dry.parser.cpd.Duplication

public class Duplication
extends java.lang.Object

Java Bean class for a violation of the PMD format.

Author:
Ulli Hafner

Constructor Summary
Duplication()
           
 
Method Summary
 void addFile(SourceFile file)
          Adds a new file to this duplication.
 java.lang.String getCodeFragment()
          Returns the duplicate code fragment.
 java.util.Collection<SourceFile> getFiles()
          Returns all files of the duplication.
 int getLines()
          Returns the number of duplicate lines.
 int getTokens()
          Returns the number of duplicate tokens.
 void setCodeFragment(java.lang.String codeFragment)
          Sets the duplicate code fragment to the specified value.
 void setLines(int lines)
          Sets the number of duplicate lines to the specified value.
 void setTokens(int tokens)
          Sets the number of duplicate tokens to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Duplication

public Duplication()
Method Detail

addFile

public void addFile(SourceFile file)
Adds a new file to this duplication.

Parameters:
file - the new file

getFiles

public java.util.Collection<SourceFile> getFiles()
Returns all files of the duplication. The returned collection is read-only.

Returns:
all files

getLines

public int getLines()
Returns the number of duplicate lines.

Returns:
the lines

setLines

public void setLines(int lines)
Sets the number of duplicate lines to the specified value.

Parameters:
lines - the value to set

getTokens

public int getTokens()
Returns the number of duplicate tokens.

Returns:
the tokens

setTokens

public void setTokens(int tokens)
Sets the number of duplicate tokens to the specified value.

Parameters:
tokens - the value to set

getCodeFragment

public java.lang.String getCodeFragment()
Returns the duplicate code fragment.

Returns:
the duplicate code fragment

setCodeFragment

public void setCodeFragment(java.lang.String codeFragment)
Sets the duplicate code fragment to the specified value.

Parameters:
codeFragment - the value to set


Copyright © 2009. All Rights Reserved.