View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.9.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: 1008624 $ $Date: 2017-03-19 14:17:57 +0000 (Sun, 19 Mar 2017) $
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       *             For a plugin project (packaging is
25       * <code>maven-plugin</code>), the minimum version of
26       *             Maven required to use the resulting plugin.<br>
27       *             In Maven 2, this was also specifying the minimum
28       * version of Maven required to build a
29       *             project, but this usage is <b>deprecated</b> in
30       * Maven 3 and not checked any more: use
31       *             the <a
32       * href="https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html">Maven
33       * Enforcer Plugin's
34       *             <code>requireMavenVersion</code> rule</a>
35       * instead.
36       *             
37       *           
38       */
39      private String maven = "2.0";
40  
41      /**
42       * Field locations.
43       */
44      private java.util.Map<Object, InputLocation> locations;
45  
46  
47        //-----------/
48       //- Methods -/
49      //-----------/
50  
51      /**
52       * Method clone.
53       * 
54       * @return Prerequisites
55       */
56      public Prerequisites clone()
57      {
58          try
59          {
60              Prerequisites copy = (Prerequisites) super.clone();
61  
62              if ( copy.locations != null )
63              {
64                  copy.locations = new java.util.LinkedHashMap( copy.locations );
65              }
66  
67              return copy;
68          }
69          catch ( java.lang.Exception ex )
70          {
71              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
72                  + " does not support clone()" ).initCause( ex );
73          }
74      } //-- Prerequisites clone()
75  
76      /**
77       * 
78       * 
79       * @param key
80       * @return InputLocation
81       */
82      public InputLocation getLocation( Object key )
83      {
84          return ( locations != null ) ? locations.get( key ) : null;
85      } //-- InputLocation getLocation( Object )
86  
87      /**
88       * Get for a plugin project (packaging is
89       * <code>maven-plugin</code>), the minimum version of
90       *             Maven required to use the resulting plugin.<br>
91       *             In Maven 2, this was also specifying the minimum
92       * version of Maven required to build a
93       *             project, but this usage is <b>deprecated</b> in
94       * Maven 3 and not checked any more: use
95       *             the <a
96       * href="https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html">Maven
97       * Enforcer Plugin's
98       *             <code>requireMavenVersion</code> rule</a>
99       * instead.
100      * 
101      * @return String
102      */
103     public String getMaven()
104     {
105         return this.maven;
106     } //-- String getMaven()
107 
108     /**
109      * 
110      * 
111      * @param key
112      * @param location
113      */
114     public void setLocation( Object key, InputLocation location )
115     {
116         if ( location != null )
117         {
118             if ( this.locations == null )
119             {
120                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
121             }
122             this.locations.put( key, location );
123         }
124     } //-- void setLocation( Object, InputLocation )
125 
126     /**
127      * Set for a plugin project (packaging is
128      * <code>maven-plugin</code>), the minimum version of
129      *             Maven required to use the resulting plugin.<br>
130      *             In Maven 2, this was also specifying the minimum
131      * version of Maven required to build a
132      *             project, but this usage is <b>deprecated</b> in
133      * Maven 3 and not checked any more: use
134      *             the <a
135      * href="https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html">Maven
136      * Enforcer Plugin's
137      *             <code>requireMavenVersion</code> rule</a>
138      * instead.
139      * 
140      * @param maven
141      */
142     public void setMaven( String maven )
143     {
144         this.maven = maven;
145     } //-- void setMaven( String )
146 
147 }