View Javadoc

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