1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.plugins.pmd;
20
21 import java.io.File;
22 import java.io.IOException;
23
24 import org.apache.maven.project.MavenProject;
25
26
27
28
29 public class PmdFileInfo {
30
31 private MavenProject project;
32
33 private File sourceDir;
34
35 private String xref;
36
37 public PmdFileInfo(MavenProject project, File dir, String x) throws IOException {
38 this.project = project;
39 if (dir.isAbsolute()) {
40 this.sourceDir = dir.getCanonicalFile();
41 } else {
42 this.sourceDir = new File(project.getBasedir(), dir.getPath()).getCanonicalFile();
43 }
44 this.xref = x;
45 }
46
47 public String getXrefLocation() {
48 return xref;
49 }
50
51 public File getSourceDirectory() {
52 return sourceDir;
53 }
54
55 public MavenProject getProject() {
56 return project;
57 }
58 }