View Javadoc

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