1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.tools.plugin.extractor.annotations.scanner;
20
21 import java.util.Arrays;
22 import java.util.List;
23 import java.util.Map;
24
25 import org.apache.maven.plugins.annotations.Component;
26 import org.apache.maven.plugins.annotations.Execute;
27 import org.apache.maven.plugins.annotations.Mojo;
28 import org.apache.maven.plugins.annotations.Parameter;
29 import org.apache.maven.tools.plugin.extractor.ExtractionException;
30
31
32
33
34
35 public interface MojoAnnotationsScanner {
36 String ROLE = MojoAnnotationsScanner.class.getName();
37
38 String V4_API_PLUGIN_PACKAGE = "org.apache.maven.api.plugin";
39
40 String V4_API_ANNOTATIONS_PACKAGE = V4_API_PLUGIN_PACKAGE + ".annotations";
41
42 List<String> CLASS_LEVEL_ANNOTATIONS = Arrays.asList(
43 Mojo.class.getName(),
44 Execute.class.getName(),
45 Deprecated.class.getName(),
46 V4_API_ANNOTATIONS_PACKAGE + ".Mojo",
47 V4_API_ANNOTATIONS_PACKAGE + ".Execute",
48 V4_API_ANNOTATIONS_PACKAGE + ".After",
49 V4_API_ANNOTATIONS_PACKAGE + ".Afters");
50
51 List<String> FIELD_LEVEL_ANNOTATIONS = Arrays.asList(
52 Parameter.class.getName(),
53 Component.class.getName(),
54 Deprecated.class.getName(),
55 V4_API_ANNOTATIONS_PACKAGE + ".Parameter",
56 V4_API_ANNOTATIONS_PACKAGE + ".Resolution");
57
58 List<String> METHOD_LEVEL_ANNOTATIONS = Arrays.asList(
59 Parameter.class.getName(), Deprecated.class.getName(), V4_API_ANNOTATIONS_PACKAGE + ".Parameter");
60
61
62
63
64
65
66
67
68 Map<String, MojoAnnotatedClass> scan(MojoAnnotationsScannerRequest request) throws ExtractionException;
69 }