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       * The minimum version of Maven required to build the project.
24       * If this project is a plugin, this is
25       *           in addition the minimum version of Maven required
26       * to use it.
27       */
28      private String maven = "2.0";
29  
30      /**
31       * Field locations.
32       */
33      private java.util.Map<Object, InputLocation> locations;
34  
35  
36        //-----------/
37       //- Methods -/
38      //-----------/
39  
40      /**
41       * Method clone.
42       * 
43       * @return Prerequisites
44       */
45      public Prerequisites clone()
46      {
47          try
48          {
49              Prerequisites copy = (Prerequisites) super.clone();
50  
51              if ( copy.locations != null )
52              {
53                  copy.locations = new java.util.LinkedHashMap( copy.locations );
54              }
55  
56              return copy;
57          }
58          catch ( java.lang.Exception ex )
59          {
60              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
61                  + " does not support clone()" ).initCause( ex );
62          }
63      } //-- Prerequisites clone()
64  
65      /**
66       * 
67       * 
68       * @param key
69       * @return InputLocation
70       */
71      public InputLocation getLocation( Object key )
72      {
73          return ( locations != null ) ? locations.get( key ) : null;
74      } //-- InputLocation getLocation( Object )
75  
76      /**
77       * Get the minimum version of Maven required to build the
78       * project. If this project is a plugin, this is
79       *           in addition the minimum version of Maven required
80       * to use it.
81       * 
82       * @return String
83       */
84      public String getMaven()
85      {
86          return this.maven;
87      } //-- String getMaven()
88  
89      /**
90       * 
91       * 
92       * @param key
93       * @param location
94       */
95      public void setLocation( Object key, InputLocation location )
96      {
97          if ( location != null )
98          {
99              if ( this.locations == null )
100             {
101                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
102             }
103             this.locations.put( key, location );
104         }
105     } //-- void setLocation( Object, InputLocation )
106 
107     /**
108      * Set the minimum version of Maven required to build the
109      * project. If this project is a plugin, this is
110      *           in addition the minimum version of Maven required
111      * to use it.
112      * 
113      * @param maven
114      */
115     public void setMaven( String maven )
116     {
117         this.maven = maven;
118     } //-- void setMaven( String )
119 
120 }