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 * Describes the prerequisites a project can have.
010 * 
011 * @version $Revision$ $Date$
012 */
013@SuppressWarnings( "all" )
014public class Prerequisites
015    implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
016{
017
018      //--------------------------/
019     //- Class/Member Variables -/
020    //--------------------------/
021
022    /**
023     * 
024     *             The minimum version of Maven required to build
025     * the project.<br />
026     *             If this project builds a plugin, this is in
027     * addition the minimum version of Maven required to use
028     *             the resulting plugin.
029     *           
030     */
031    private String maven = "2.0";
032
033    /**
034     * Field locations.
035     */
036    private java.util.Map<Object, InputLocation> locations;
037
038
039      //-----------/
040     //- Methods -/
041    //-----------/
042
043    /**
044     * Method clone.
045     * 
046     * @return Prerequisites
047     */
048    public Prerequisites clone()
049    {
050        try
051        {
052            Prerequisites copy = (Prerequisites) super.clone();
053
054            if ( copy.locations != null )
055            {
056                copy.locations = new java.util.LinkedHashMap( copy.locations );
057            }
058
059            return copy;
060        }
061        catch ( java.lang.Exception ex )
062        {
063            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
064                + " does not support clone()" ).initCause( ex );
065        }
066    } //-- Prerequisites clone()
067
068    /**
069     * 
070     * 
071     * @param key
072     * @return InputLocation
073     */
074    public InputLocation getLocation( Object key )
075    {
076        return ( locations != null ) ? locations.get( key ) : null;
077    } //-- InputLocation getLocation( Object )
078
079    /**
080     * Get the minimum version of Maven required to build the
081     * project.<br />
082     *             If this project builds a plugin, this is in
083     * addition the minimum version of Maven required to use
084     *             the resulting plugin.
085     * 
086     * @return String
087     */
088    public String getMaven()
089    {
090        return this.maven;
091    } //-- String getMaven()
092
093    /**
094     * 
095     * 
096     * @param key
097     * @param location
098     */
099    public void setLocation( Object key, InputLocation location )
100    {
101        if ( location != null )
102        {
103            if ( this.locations == null )
104            {
105                this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
106            }
107            this.locations.put( key, location );
108        }
109    } //-- void setLocation( Object, InputLocation )
110
111    /**
112     * Set the minimum version of Maven required to build the
113     * project.<br />
114     *             If this project builds a plugin, this is in
115     * addition the minimum version of Maven required to use
116     *             the resulting plugin.
117     * 
118     * @param maven
119     */
120    public void setMaven( String maven )
121    {
122        this.maven = maven;
123    } //-- void setMaven( String )
124
125}