View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.8.1,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * This is the file specification used to activate the profile. The
10   * missing value
11   *         will be the location of a file that needs to exist, and
12   * if it doesn't the profile will be
13   *         activated. On the other hand exists will test for the
14   * existence of the file and if it is
15   *         there the profile will be activated.
16   * 
17   * @version $Revision$ $Date$
18   */
19  @SuppressWarnings( "all" )
20  public class ActivationFile
21      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
22  {
23  
24        //--------------------------/
25       //- Class/Member Variables -/
26      //--------------------------/
27  
28      /**
29       * The name of the file that must be missing to activate the
30       *           profile.
31       */
32      private String missing;
33  
34      /**
35       * The name of the file that must exist to activate the profile.
36       */
37      private String exists;
38  
39      /**
40       * Field locations.
41       */
42      private java.util.Map<Object, InputLocation> locations;
43  
44  
45        //-----------/
46       //- Methods -/
47      //-----------/
48  
49      /**
50       * Method clone.
51       * 
52       * @return ActivationFile
53       */
54      public ActivationFile clone()
55      {
56          try
57          {
58              ActivationFile copy = (ActivationFile) super.clone();
59  
60              if ( copy.locations != null )
61              {
62                  copy.locations = new java.util.LinkedHashMap( copy.locations );
63              }
64  
65              return copy;
66          }
67          catch ( java.lang.Exception ex )
68          {
69              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
70                  + " does not support clone()" ).initCause( ex );
71          }
72      } //-- ActivationFile clone()
73  
74      /**
75       * Get the name of the file that must exist to activate the
76       * profile.
77       * 
78       * @return String
79       */
80      public String getExists()
81      {
82          return this.exists;
83      } //-- String getExists()
84  
85      /**
86       * 
87       * 
88       * @param key
89       * @return InputLocation
90       */
91      public InputLocation getLocation( Object key )
92      {
93          return ( locations != null ) ? locations.get( key ) : null;
94      } //-- InputLocation getLocation( Object )
95  
96      /**
97       * Get the name of the file that must be missing to activate
98       * the
99       *           profile.
100      * 
101      * @return String
102      */
103     public String getMissing()
104     {
105         return this.missing;
106     } //-- String getMissing()
107 
108     /**
109      * Set the name of the file that must exist to activate the
110      * profile.
111      * 
112      * @param exists
113      */
114     public void setExists( String exists )
115     {
116         this.exists = exists;
117     } //-- void setExists( String )
118 
119     /**
120      * 
121      * 
122      * @param key
123      * @param location
124      */
125     public void setLocation( Object key, InputLocation location )
126     {
127         if ( location != null )
128         {
129             if ( this.locations == null )
130             {
131                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
132             }
133             this.locations.put( key, location );
134         }
135     } //-- void setLocation( Object, InputLocation )
136 
137     /**
138      * Set the name of the file that must be missing to activate
139      * the
140      *           profile.
141      * 
142      * @param missing
143      */
144     public void setMissing( String missing )
145     {
146         this.missing = missing;
147     } //-- void setMissing( String )
148 
149 }