001// =================== DO NOT EDIT THIS FILE ==================== 002// Generated by Modello 1.8.1, 003// any modifications will be overwritten. 004// ============================================================== 005 006package org.apache.maven.model; 007 008/** 009 * Describes the prerequisites a project can have. 010 * 011 * @version $Revision$ $Date$ 012 */ 013@SuppressWarnings( "all" ) 014public class Prerequisites 015 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker 016{ 017 018 //--------------------------/ 019 //- Class/Member Variables -/ 020 //--------------------------/ 021 022 /** 023 * The minimum version of Maven required to build the project. 024 * If this project is a plugin, this is 025 * in addition the minimum version of Maven required 026 * to use it. 027 */ 028 private String maven = "2.0"; 029 030 /** 031 * Field locations. 032 */ 033 private java.util.Map<Object, InputLocation> locations; 034 035 036 //-----------/ 037 //- Methods -/ 038 //-----------/ 039 040 /** 041 * Method clone. 042 * 043 * @return Prerequisites 044 */ 045 public Prerequisites clone() 046 { 047 try 048 { 049 Prerequisites copy = (Prerequisites) super.clone(); 050 051 if ( copy.locations != null ) 052 { 053 copy.locations = new java.util.LinkedHashMap( copy.locations ); 054 } 055 056 return copy; 057 } 058 catch ( java.lang.Exception ex ) 059 { 060 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 061 + " does not support clone()" ).initCause( ex ); 062 } 063 } //-- Prerequisites clone() 064 065 /** 066 * 067 * 068 * @param key 069 * @return InputLocation 070 */ 071 public InputLocation getLocation( Object key ) 072 { 073 return ( locations != null ) ? locations.get( key ) : null; 074 } //-- InputLocation getLocation( Object ) 075 076 /** 077 * Get the minimum version of Maven required to build the 078 * project. If this project is a plugin, this is 079 * in addition the minimum version of Maven required 080 * to use it. 081 * 082 * @return String 083 */ 084 public String getMaven() 085 { 086 return this.maven; 087 } //-- String getMaven() 088 089 /** 090 * 091 * 092 * @param key 093 * @param location 094 */ 095 public void setLocation( Object key, InputLocation location ) 096 { 097 if ( location != null ) 098 { 099 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}