View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.8.1,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * Describes the prerequisites a project can have.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class Prerequisites
15      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * 
24       *             The minimum version of Maven required to build
25       * the project.<br />
26       *             If this project builds a plugin, this is in
27       * addition the minimum version of Maven required to use
28       *             the resulting plugin.
29       *           
30       */
31      private String maven = "2.0";
32  
33      /**
34       * Field locations.
35       */
36      private java.util.Map<Object, InputLocation> locations;
37  
38  
39        //-----------/
40       //- Methods -/
41      //-----------/
42  
43      /**
44       * Method clone.
45       * 
46       * @return Prerequisites
47       */
48      public Prerequisites clone()
49      {
50          try
51          {
52              Prerequisites copy = (Prerequisites) super.clone();
53  
54              if ( copy.locations != null )
55              {
56                  copy.locations = new java.util.LinkedHashMap( copy.locations );
57              }
58  
59              return copy;
60          }
61          catch ( java.lang.Exception ex )
62          {
63              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
64                  + " does not support clone()" ).initCause( ex );
65          }
66      } //-- Prerequisites clone()
67  
68      /**
69       * 
70       * 
71       * @param key
72       * @return InputLocation
73       */
74      public InputLocation getLocation( Object key )
75      {
76          return ( locations != null ) ? locations.get( key ) : null;
77      } //-- InputLocation getLocation( Object )
78  
79      /**
80       * Get the minimum version of Maven required to build the
81       * project.<br />
82       *             If this project builds a plugin, this is in
83       * addition the minimum version of Maven required to use
84       *             the resulting plugin.
85       * 
86       * @return String
87       */
88      public String getMaven()
89      {
90          return this.maven;
91      } //-- String getMaven()
92  
93      /**
94       * 
95       * 
96       * @param key
97       * @param location
98       */
99      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 }