View Javadoc
1   /* Created on Oct 4, 2004 */
2   package org.codehaus.plexus.compiler.ajc;
3   
4   import java.io.File;
5   import java.util.Collections;
6   import java.util.LinkedList;
7   import java.util.List;
8   import java.util.Map;
9   import java.util.TreeMap;
10  
11  import org.codehaus.plexus.compiler.CompilerConfiguration;
12  
13  /**
14   * @author jdcasey
15   */
16  public class AspectJCompilerConfiguration extends CompilerConfiguration {
17  
18      private List<String> aspectPath = new LinkedList<>();
19  
20      private List<String> inJars = new LinkedList<>();
21  
22      private List<String> inPath = new LinkedList<>();
23  
24      private String outputJar;
25  
26      private Map<String, String> ajOptions = new TreeMap<>();
27  
28      private Map<String, File> sourcePathResources;
29  
30      public void setAspectPath(List<String> aspectPath) {
31          this.aspectPath = new LinkedList<>(aspectPath);
32      }
33  
34      public void addAspectPath(String aspectPath) {
35          this.aspectPath.add(aspectPath);
36      }
37  
38      public List<String> getAspectPath() {
39          return Collections.unmodifiableList(aspectPath);
40      }
41  
42      public void setInJars(List<String> inJars) {
43          this.inJars = new LinkedList<>(inJars);
44      }
45  
46      public void addInJar(String inJar) {
47          this.inJars.add(inJar);
48      }
49  
50      public List<String> getInJars() {
51          return Collections.unmodifiableList(inJars);
52      }
53  
54      public void setInPath(List<String> inPath) {
55          this.inPath = new LinkedList<>(inPath);
56      }
57  
58      public void addInPath(String inPath) {
59          this.inPath.add(inPath);
60      }
61  
62      public List<String> getInPath() {
63          return Collections.unmodifiableList(inPath);
64      }
65  
66      public void setOutputJar(String outputJar) {
67          this.outputJar = outputJar;
68      }
69  
70      public String getOutputJar() {
71          return outputJar;
72      }
73  
74      /**
75       * Ignored, not supported yet
76       */
77      public void setAJOptions(Map<String, String> ajOptions) {
78          // TODO
79          // this.ajOptions = new TreeMap( ajOptions );
80      }
81  
82      public void setAJOption(String optionName, String optionValue) {
83          this.ajOptions.put(optionName, optionValue);
84      }
85  
86      /**
87       * Ignored, not supported yet
88       * @return empty Map
89       */
90      public Map<String, String> getAJOptions() {
91          return Collections.unmodifiableMap(ajOptions);
92      }
93  
94      public void setSourcePathResources(Map<String, File> sourcePathResources) {
95          this.sourcePathResources = new TreeMap<>(sourcePathResources);
96      }
97  
98      public Map<String, File> getSourcePathResources() {
99          return sourcePathResources;
100     }
101 }