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 final class ValidatorCallable implements Callable<Collection<Violation>> {
18
19
20
21
22 private final ResourceValidator validator;
23
24
25
26
27 private final MavenEnvironment env;
28
29
30
31
32 private final Collection<File> files;
33
34
35
36
37
38
39
40 ValidatorCallable(
41 final ResourceValidator validator,
42 final MavenEnvironment env, final Collection<File> files
43 ) {
44 this.validator = validator;
45 this.env = env;
46 this.files = files;
47 }
48
49 @Override
50 public Collection<Violation> call() {
51 return this.validator.validate(
52 CheckMojo.filter(this.env, this.files, this.validator)
53 );
54 }
55 }