1
2
3
4
5 package com.qulice.maven;
6
7 import com.qulice.spi.ResourceValidator;
8 import com.qulice.spi.Violation;
9 import java.io.File;
10 import java.util.Collection;
11 import java.util.concurrent.Callable;
12
13
14
15
16
17
18 final class ValidatorCallable implements Callable<Collection<Violation>> {
19
20
21
22
23 private final ResourceValidator validator;
24
25
26
27
28 private final MavenEnvironment env;
29
30
31
32
33 private final Collection<File> files;
34
35
36
37
38
39
40
41
42 ValidatorCallable(
43 final ResourceValidator validator,
44 final MavenEnvironment env, final Collection<File> files
45 ) {
46 this.validator = validator;
47 this.env = env;
48 this.files = files;
49 }
50
51 @Override
52 public Collection<Violation> call() {
53 return this.validator.validate(
54 CheckMojo.filter(this.env, this.files, this.validator)
55 );
56 }
57 }