View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2013-02-24 03:32:14,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * Describes the prerequisites a project can have.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class Prerequisites
17      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * The minimum version of Maven required to build the project,
26       * or to use this
27       *             plugin.
28       */
29      private String maven = "2.0";
30  
31      /**
32       * Field locations.
33       */
34      private java.util.Map<Object, InputLocation> locations;
35  
36  
37        //-----------/
38       //- Methods -/
39      //-----------/
40  
41      /**
42       * Method clone.
43       * 
44       * @return Prerequisites
45       */
46      public Prerequisites clone()
47      {
48          try
49          {
50              Prerequisites copy = (Prerequisites) super.clone();
51  
52              if ( copy.locations != null )
53              {
54                  copy.locations = new java.util.LinkedHashMap( copy.locations );
55              }
56  
57              return copy;
58          }
59          catch ( java.lang.Exception ex )
60          {
61              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
62                  + " does not support clone()" ).initCause( ex );
63          }
64      } //-- Prerequisites clone()
65  
66      /**
67       * 
68       * 
69       * @param key
70       * @return InputLocation
71       */
72      public InputLocation getLocation( Object key )
73      {
74          return ( locations != null ) ? locations.get( key ) : null;
75      } //-- InputLocation getLocation( Object )
76  
77      /**
78       * Get the minimum version of Maven required to build the
79       * project, or to use this
80       *             plugin.
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, or to use this
110      *             plugin.
111      * 
112      * @param maven
113      */
114     public void setMaven( String maven )
115     {
116         this.maven = maven;
117     } //-- void setMaven( String )
118 
119 }