View Javadoc

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