001 // =================== DO NOT EDIT THIS FILE ====================
002 // Generated by Modello 1.7,
003 // any modifications will be overwritten.
004 // ==============================================================
005
006 package org.apache.maven.model;
007
008 /**
009 * Describes the prerequisites a project can have.
010 *
011 * @version $Revision$ $Date$
012 */
013 @SuppressWarnings( "all" )
014 public 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 * The minimum version of Maven required to build the project,
024 * or to use this
025 * plugin.
026 */
027 private String maven = "2.0";
028
029 /**
030 * Field locations.
031 */
032 private java.util.Map<Object, InputLocation> locations;
033
034
035 //-----------/
036 //- Methods -/
037 //-----------/
038
039 /**
040 * Method clone.
041 *
042 * @return Prerequisites
043 */
044 public Prerequisites clone()
045 {
046 try
047 {
048 Prerequisites copy = (Prerequisites) super.clone();
049
050 if ( copy.locations != null )
051 {
052 copy.locations = new java.util.LinkedHashMap( copy.locations );
053 }
054
055 return copy;
056 }
057 catch ( java.lang.Exception ex )
058 {
059 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
060 + " does not support clone()" ).initCause( ex );
061 }
062 } //-- Prerequisites clone()
063
064 /**
065 *
066 *
067 * @param key
068 * @return InputLocation
069 */
070 public InputLocation getLocation( Object key )
071 {
072 return ( locations != null ) ? locations.get( key ) : null;
073 } //-- InputLocation getLocation( Object )
074
075 /**
076 * Get the minimum version of Maven required to build the
077 * project, or to use this
078 * plugin.
079 *
080 * @return String
081 */
082 public String getMaven()
083 {
084 return this.maven;
085 } //-- String getMaven()
086
087 /**
088 *
089 *
090 * @param key
091 * @param location
092 */
093 public void setLocation( Object key, InputLocation location )
094 {
095 if ( location != null )
096 {
097 if ( this.locations == null )
098 {
099 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
100 }
101 this.locations.put( key, location );
102 }
103 } //-- void setLocation( Object, InputLocation )
104
105 /**
106 * Set the minimum version of Maven required to build the
107 * project, or to use this
108 * plugin.
109 *
110 * @param maven
111 */
112 public void setMaven( String maven )
113 {
114 this.maven = maven;
115 } //-- void setMaven( String )
116
117 }