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