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 * This is the file specification used to activate the profile. The 10 * <code>missing</code> value 11 * is the location of a file that needs to exist, and if it 12 * doesn't, the profile will be 13 * activated. On the other hand, <code>exists</code> will 14 * test for the existence of the file and if it is 15 * there, the profile will be activated.<br/> 16 * Variable interpolation for these file specifications is 17 * limited to <code>${basedir}</code>, 18 * System properties and request properties. 19 * 20 * @version $Revision$ $Date$ 21 */ 22 @SuppressWarnings( "all" ) 23 public class ActivationFile 24 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker 25 { 26 27 //--------------------------/ 28 //- Class/Member Variables -/ 29 //--------------------------/ 30 31 /** 32 * The name of the file that must be missing to activate the 33 * profile. 34 */ 35 private String missing; 36 37 /** 38 * The name of the file that must exist to activate the profile. 39 */ 40 private String exists; 41 42 /** 43 * Field locations. 44 */ 45 private java.util.Map<Object, InputLocation> locations; 46 47 48 //-----------/ 49 //- Methods -/ 50 //-----------/ 51 52 /** 53 * Method clone. 54 * 55 * @return ActivationFile 56 */ 57 public ActivationFile clone() 58 { 59 try 60 { 61 ActivationFile copy = (ActivationFile) super.clone(); 62 63 if ( copy.locations != null ) 64 { 65 copy.locations = new java.util.LinkedHashMap( copy.locations ); 66 } 67 68 return copy; 69 } 70 catch ( java.lang.Exception ex ) 71 { 72 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 73 + " does not support clone()" ).initCause( ex ); 74 } 75 } //-- ActivationFile clone() 76 77 /** 78 * Get the name of the file that must exist to activate the 79 * profile. 80 * 81 * @return String 82 */ 83 public String getExists() 84 { 85 return this.exists; 86 } //-- String getExists() 87 88 /** 89 * 90 * 91 * @param key 92 * @return InputLocation 93 */ 94 public InputLocation getLocation( Object key ) 95 { 96 return ( locations != null ) ? locations.get( key ) : null; 97 } //-- InputLocation getLocation( Object ) 98 99 /** 100 * Get the name of the file that must be missing to activate 101 * the 102 * profile. 103 * 104 * @return String 105 */ 106 public String getMissing() 107 { 108 return this.missing; 109 } //-- String getMissing() 110 111 /** 112 * Set the name of the file that must exist to activate the 113 * profile. 114 * 115 * @param exists 116 */ 117 public void setExists( String exists ) 118 { 119 this.exists = exists; 120 } //-- void setExists( String ) 121 122 /** 123 * 124 * 125 * @param key 126 * @param location 127 */ 128 public void setLocation( Object key, InputLocation location ) 129 { 130 if ( location != null ) 131 { 132 if ( this.locations == null ) 133 { 134 this.locations = new java.util.LinkedHashMap<Object, InputLocation>(); 135 } 136 this.locations.put( key, location ); 137 } 138 } //-- void setLocation( Object, InputLocation ) 139 140 /** 141 * Set the name of the file that must be missing to activate 142 * the 143 * profile. 144 * 145 * @param missing 146 */ 147 public void setMissing( String missing ) 148 { 149 this.missing = missing; 150 } //-- void setMissing( String ) 151 152 }