
edu.hm.hafner.analysis.parser.dry.cpd.SourceFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of analysis-model Show documentation
Show all versions of analysis-model Show documentation
This library provides a Java object model to read, aggregate, filter, and query static analysis reports.
It is used by Jenkins' warnings next generation plug-in to visualize the warnings of individual builds.
Additionally, this library is used by a GitHub action to autograde student software projects based on a given set of
metrics (unit tests, code and mutation coverage, static analysis warnings).
package edu.hm.hafner.analysis.parser.dry.cpd;
import edu.umd.cs.findbugs.annotations.CheckForNull;
/**
* Java Bean class for a file of the PMD CPD format.
*
* @author Ullrich Hafner
*/
@SuppressWarnings("PMD.DataClass")
public class SourceFile {
/** Starting line number in file. */
private int line;
/** Path of the file. */
@CheckForNull
private String path;
/**
* Returns the path of this file.
*
* @return the path of this file
*/
@CheckForNull
public String getPath() {
return path;
}
/**
* Sets the path of this file to the specified value.
*
* @param path
* the value to set
*/
public void setPath(@CheckForNull final String path) {
this.path = path;
}
/**
* Returns the line of the duplication.
*
* @return the line of the duplication
*/
public int getLine() {
return line;
}
/**
* Sets the line of the duplication to the specified value.
*
* @param line
* the value to set
*/
public void setLine(final int line) {
this.line = line;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy