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