1 |
|
package org.apache.torque.util; |
2 |
|
|
3 |
|
import java.io.File; |
4 |
|
import java.util.ArrayList; |
5 |
|
import java.util.List; |
6 |
|
|
7 |
|
import org.codehaus.plexus.util.DirectoryScanner; |
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
|
|
| 0% |
Uncovered Elements: 25 (25) |
Complexity: 6 |
Complexity Density: 0.38 |
|
12 |
|
public class SimpleScanner extends DirectoryScanner { |
13 |
|
private static final String FS = System.getProperty("file.separator"); |
14 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
15 |
0
|
public SimpleScanner() {... |
16 |
0
|
this(null, null, null); |
17 |
|
} |
18 |
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 4 |
Complexity Density: 0.57 |
|
19 |
0
|
public SimpleScanner(File baseDir, String include, String exclude) {... |
20 |
0
|
super(); |
21 |
0
|
if (baseDir != null) { |
22 |
0
|
setBasedir(baseDir); |
23 |
|
} |
24 |
0
|
if (include != null) { |
25 |
0
|
setIncludes(new String[] { include }); |
26 |
|
} |
27 |
0
|
if (exclude != null) { |
28 |
0
|
setExcludes(new String[] { exclude }); |
29 |
|
} |
30 |
|
} |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
35 |
0
|
public List<File> getFiles() {... |
36 |
0
|
scan(); |
37 |
0
|
String[] includedFiles = getIncludedFiles(); |
38 |
0
|
List<File> files = new ArrayList<File>(); |
39 |
0
|
for (String includedFile : includedFiles) { |
40 |
0
|
String filename = getBasedir().getAbsolutePath() + FS + includedFile; |
41 |
0
|
File file = new File(filename); |
42 |
0
|
files.add(file); |
43 |
|
} |
44 |
0
|
return files; |
45 |
|
} |
46 |
|
} |