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