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
17      extends CompilerConfiguration
18  {
19  
20      private List<String> aspectPath = new LinkedList<String>();
21  
22      private List<String> inJars = new LinkedList<String>();
23  
24      private List<String> inPath = new LinkedList<String>();
25  
26      private String outputJar;
27  
28      private Map<String, String> ajOptions = new TreeMap<String, String>();
29  
30      private Map<String, File> sourcePathResources;
31  
32      public void setAspectPath( List<String> aspectPath )
33      {
34          this.aspectPath = new LinkedList<String>( aspectPath );
35      }
36  
37      public void addAspectPath( String aspectPath )
38      {
39          this.aspectPath.add( aspectPath );
40      }
41  
42      public List<String> getAspectPath()
43      {
44          return Collections.unmodifiableList( aspectPath );
45      }
46  
47      public void setInJars( List<String> inJars )
48      {
49          this.inJars = new LinkedList<String>( inJars );
50      }
51  
52      public void addInJar( String inJar )
53      {
54          this.inJars.add( inJar );
55      }
56  
57      public List<String> getInJars()
58      {
59          return Collections.unmodifiableList( inJars );
60      }
61  
62      public void setInPath( List<String> inPath )
63      {
64          this.inPath = new LinkedList<String>( inPath );
65      }
66  
67      public void addInPath( String inPath )
68      {
69          this.inPath.add( inPath );
70      }
71  
72      public List<String> getInPath()
73      {
74          return Collections.unmodifiableList( inPath );
75      }
76  
77      public void setOutputJar( String outputJar )
78      {
79          this.outputJar = outputJar;
80      }
81  
82      public String getOutputJar()
83      {
84          return outputJar;
85      }
86  
87      /**
88       * Ignored, not supported yet
89       * @param ajOptions
90       */
91      public void setAJOptions( Map<String, String> ajOptions )
92      {
93          //TODO
94          //this.ajOptions = new TreeMap( ajOptions );
95      }
96  
97      public void setAJOption( String optionName, String optionValue )
98      {
99          this.ajOptions.put( optionName, optionValue );
100     }
101 
102     /**
103      * Ignored, not supported yet
104      * @return empty Map
105      */
106     public Map<String, String> getAJOptions()
107     {
108         return Collections.unmodifiableMap( ajOptions );
109     }
110 
111     public void setSourcePathResources( Map<String, File> sourcePathResources )
112     {
113         this.sourcePathResources = new TreeMap<String, File>( sourcePathResources );
114     }
115 
116     public Map<String, File> getSourcePathResources()
117     {
118         return sourcePathResources;
119     }
120 
121 }