001 /*
002 =================== DO NOT EDIT THIS FILE ====================
003 Generated by Modello 1.4.1 on 2012-01-20 18:05:12,
004 any modifications will be overwritten.
005 ==============================================================
006 */
007
008 package org.apache.maven.model;
009
010 /**
011 * This is the property specification used to activate a profile.
012 * If the value field
013 * is empty, then the existence of the named property will
014 * activate the profile, otherwise it
015 * does a case-sensitive match against the property value
016 * as well.
017 *
018 * @version $Revision$ $Date$
019 */
020 @SuppressWarnings( "all" )
021 public class ActivationProperty
022 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
023 {
024
025 //--------------------------/
026 //- Class/Member Variables -/
027 //--------------------------/
028
029 /**
030 * The name of the property to be used to activate a profile.
031 */
032 private String name;
033
034 /**
035 * The value of the property required to activate a profile.
036 */
037 private String value;
038
039 /**
040 * Field locations.
041 */
042 private java.util.Map<Object, InputLocation> locations;
043
044
045 //-----------/
046 //- Methods -/
047 //-----------/
048
049 /**
050 * Method clone.
051 *
052 * @return ActivationProperty
053 */
054 public ActivationProperty clone()
055 {
056 try
057 {
058 ActivationProperty copy = (ActivationProperty) super.clone();
059
060 if ( copy.locations != null )
061 {
062 copy.locations = new java.util.LinkedHashMap( copy.locations );
063 }
064
065 return copy;
066 }
067 catch ( java.lang.Exception ex )
068 {
069 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
070 + " does not support clone()" ).initCause( ex );
071 }
072 } //-- ActivationProperty clone()
073
074 /**
075 *
076 *
077 * @param key
078 * @return InputLocation
079 */
080 public InputLocation getLocation( Object key )
081 {
082 return ( locations != null ) ? locations.get( key ) : null;
083 } //-- InputLocation getLocation( Object )
084
085 /**
086 * Get the name of the property to be used to activate a
087 * profile.
088 *
089 * @return String
090 */
091 public String getName()
092 {
093 return this.name;
094 } //-- String getName()
095
096 /**
097 * Get the value of the property required to activate a
098 * profile.
099 *
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 }