/* sbt -- Simple Build Tool
 * Copyright 2008 Mark Harrah, David MacIver
 */
package sbt

import scala.reflect.Manifest

trait trait Environment extends java.lang.Object with ScalaObjectEnvironment
{
	abstract class class Property[T] extends java.lang.Object with NotNull with ScalaObjectProperty[>: Nothing <: AnyT] extends NotNullNotNull
	{
		/** Explicitly sets the value of this property to 'v'.*/
		def (T)Unitupdate(Tv: TT): UnitUnit
		/** Returns the current value of this property or throws an exception if the value could not be obtained.*/
		def => Tvalue: TT = => sbt.PropertyResolution[T]resolve.=> Tvalue
		/** Returns the current value of this property in an 'Option'.  'None' is used to indicate that the
		* value could not obtained.*/
		def => Option[T]get: Option[T]Option[T] = => sbt.PropertyResolution[T]resolve.=> Option[T]toOption
		/** Returns full information about this property's current value. */
		def => sbt.PropertyResolution[T]resolve: sbt.PropertyResolution[T]PropertyResolution[T]
		
		def ((T) => Unit)Unitforeach((T) => Unitf: T => Unit): UnitUnit = => sbt.PropertyResolution[T]resolve.((T) => Unit)Unitforeach((T) => Unitf)
	}
	
	/** Creates a system property with the given name and no default value.*/
	def [T](String)(implicit sbt.Format[T])Environment.this.Property[T]system[>: Nothing <: AnyT](StringpropName: StringString)(implicit sbt.Format[T]format: sbt.Format[T]Format[T]): Environment.this.Property[T]Property[T]
	/** Creates a system property with the given name and the given default value to use if no value is explicitly specified.*/
	def [T](String,=> T)(implicit sbt.Format[T])Environment.this.Property[T]systemOptional[>: Nothing <: AnyT](StringpropName: StringString, => TdefaultValue: => T)(implicit sbt.Format[T]format: sbt.Format[T]Format[T]): Environment.this.Property[T]Property[T]
	/** Creates a user-defined property that has no default value.  The property will try to inherit its value
	* from a parent environment (if one exists) if its value is not explicitly specified.  An explicitly specified
	* value will persist between builds if the object returned by this method is assigned to a 'val' in this
	* 'Environment'.*/
	def [T](implicit scala.reflect.Manifest[T],sbt.Format[T])Environment.this.Property[T]property[>: Nothing <: AnyT](implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T], sbt.Format[T]format: sbt.Format[T]Format[T]): Environment.this.Property[T]Property[T]
	/** Creates a user-defined property that has no default value.  The property will try to inherit its value
	* from a parent environment (if one exists) if its value is not explicitly specified.  An explicitly specified
	* value will persist between builds if the object returned by this method is assigned to a 'val' in this
	* 'Environment'.  The given 'format' is used to convert an instance of 'T' to and from the 'String' representation
	* used for persistence.*/
	def [T](sbt.Format[T])(implicit scala.reflect.Manifest[T])Environment.this.Property[T]propertyF[>: Nothing <: AnyT](sbt.Format[T]format: sbt.Format[T]Format[T])(implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T]): Environment.this.Property[T]Property[T] = (implicit scala.reflect.Manifest[T],sbt.Format[T])Environment.this.Property[T]property(scala.reflect.Manifest[T]manifest, sbt.Format[T]format)
	/** Creates a user-defined property with no default value and no value inheritance from a parent environment.
	* Its value will persist between builds if the returned object is assigned to a 'val' in this 'Environment'.*/
	def [T](implicit scala.reflect.Manifest[T],sbt.Format[T])Environment.this.Property[T]propertyLocal[>: Nothing <: AnyT](implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T], sbt.Format[T]format: sbt.Format[T]Format[T]): Environment.this.Property[T]Property[T]
	/** Creates a user-defined property with no default value and no value inheritance from a parent environment.
	* The property's value will persist between builds if the object returned by this method is assigned to a
	* 'val' in this 'Environment'.  The given 'format' is used to convert an instance of 'T' to and from the
	* 'String' representation used for persistence.*/
	def [T](sbt.Format[T])(implicit scala.reflect.Manifest[T])Environment.this.Property[T]propertyLocalF[>: Nothing <: AnyT](sbt.Format[T]format: sbt.Format[T]Format[T])(implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T]): Environment.this.Property[T]Property[T] = (implicit scala.reflect.Manifest[T],sbt.Format[T])Environment.this.Property[T]propertyLocal(scala.reflect.Manifest[T]manifest, sbt.Format[T]format)
	/** Creates a user-defined property that uses the given default value if no value is explicitly specified for this property.  The property's value will persist between builds
	* if the object returned by this method is assigned to a 'val' in this 'Environment'.*/
	def [T](=> T)(implicit scala.reflect.Manifest[T],sbt.Format[T])Environment.this.Property[T]propertyOptional[>: Nothing <: AnyT](=> TdefaultValue: => T)(implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T], sbt.Format[T]format: sbt.Format[T]Format[T]): Environment.this.Property[T]Property[T]
	/** Creates a user-defined property with no value inheritance from a parent environment but with the given default
	* value if no value is explicitly specified for this property.  The property's value will persist between builds
	* if the object returned by this method is assigned to a 'val' in this 'Environment'.  The given 'format' is used
	* to convert an instance of 'T' to and from the 'String' representation used for persistence.*/
	def [T](=> T,sbt.Format[T])(implicit scala.reflect.Manifest[T])Environment.this.Property[T]propertyOptionalF[>: Nothing <: AnyT](=> TdefaultValue: => T, sbt.Format[T]format: sbt.Format[T]Format[T])(implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T]): Environment.this.Property[T]Property[T] =
		(=> T)(implicit scala.reflect.Manifest[T],sbt.Format[T])Environment.this.Property[T]propertyOptional(=> TdefaultValue)(scala.reflect.Manifest[T]manifest, sbt.Format[T]format)
}
trait trait Format[T] extends java.lang.Object with NotNullFormat[>: Nothing <: AnyT] extends NotNullNotNull
{
	def (T)StringtoString(Tt: TT): StringString
	def (String)TfromString(Strings: StringString): TT
}
abstract class class SimpleFormat[T] extends java.lang.Object with sbt.Format[T] with ScalaObjectSimpleFormat[>: Nothing <: AnyT] extends sbt.Format[T]Format[T]
{
	def (T)java.lang.StringtoString(Tt: TT) = Tt.()java.lang.StringtoString
}

import scala.collection.Map
trait trait BasicEnvironment extends java.lang.Object with sbt.Environment with ScalaObjectBasicEnvironment extends sbt.EnvironmentEnvironment
{
	protected def => sbt.Loggerlog: sbt.LoggerLogger
	/** The location of the properties file that backs the user-defined properties. */
	def => sbt.PathenvBackingPath: sbt.PathPath
	/** The environment from which user-defined properties inherit (if enabled). */
	protected def => Option[sbt.BasicEnvironment]parentEnvironment: Option[sbt.BasicEnvironment]Option[BasicEnvironment] = object NoneNone
	/** The identifier used in messages to refer to this environment. */
	def => java.lang.StringenvironmentLabel = => sbt.PathenvBackingPath.=> java.io.FileasFile.()java.lang.StringgetCanonicalPath
	
	private[this] var BooleanisModified = Boolean(false)false
	private[sbt] def (Boolean)UnitsetEnvironmentModified(Booleanmodified: BooleanBoolean) { (Unit)Unitsynchronized { BooleanisModified = Booleanmodified } }
	private[this] def => BooleanisEnvironmentModified = (Boolean)Booleansynchronized { BooleanisModified }
	
	/** Implementation of 'Property' for user-defined properties. */
	private[sbt] class class UserProperty[T] extends BasicEnvironment.this.Property[T] with ScalaObjectUserProperty[>: Nothing <: AnyT](=> Option[T]lazyDefaultValue: => Option[T], sbt.Format[T]format: sbt.Format[T]Format[T], BooleaninheritEnabled: BooleanBoolean,
		BooleaninheritFirst: BooleanBoolean, private[BasicEnvironment] val scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T]) extends BasicEnvironment.this.Property[T]Property[T]
	{
		/** The name of this property is used for persistence in the properties file and as an identifier in messages.*/
		lazy val Option[String]name = => scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap.(((String, BasicEnvironment.this.AnyUserProperty)) => Boolean)Option[(String, BasicEnvironment.this.AnyUserProperty)]find( (String, BasicEnvironment.this.AnyUserProperty)p => (String, BasicEnvironment.this.AnyUserProperty)p.=> BasicEnvironment.this.AnyUserProperty_2 (AnyRef)Booleaneq BasicEnvironment.this.UserProperty[T]this ).(((String, BasicEnvironment.this.AnyUserProperty)) => String)Option[String]map((String, BasicEnvironment.this.AnyUserProperty)_.=> String_1)
		/** Gets the name of this property or an alternative if the name is not available.*/
		private def => StringnameString = => Option[String]name.(=> String)StringgetOrElse(java.lang.String("<unnamed>")"<unnamed>")
		/** The lazily evaluated default value for this property.*/
		private lazy val Option[T]defaultValue = => Option[T]lazyDefaultValue
		/** The explicitly set value for this property.*/
		private var Option[T]explicitValue: Option[T]Option[T] = object NoneNone
		def (T)Unitupdate(Tv: TT): UnitUnit = (Unit)Unitsynchronized { (Option[T])UnitexplicitValue = (T)Some[T]Some(Tv); (Boolean)UnitsetEnvironmentModified(Boolean(true)true) }
		def => sbt.PropertyResolution[T]resolve: sbt.PropertyResolution[T]PropertyResolution[T] =
			(sbt.PropertyResolution[T])sbt.PropertyResolution[T]synchronized
			{
				sbt.PropertyResolution[T]if(BooleaninheritFirst) => sbt.PropertyResolution[T]resolveInheritFirst
				else => sbt.PropertyResolution[T]resolveDefaultFirst
			}
		private def => sbt.PropertyResolution[T]resolveInheritFirst =
			=> Option[T]explicitValue sbt.PropertyResolution[T]match
			{
				sbt.DefinedValue[T]case Some(Tv) => (T,Boolean,Boolean)sbt.DefinedValue[T]DefinedValue(Tv, Boolean(false)false, Boolean(false)false)
				sbt.PropertyResolution[T]case object NoneNone =>
					val sbt.PropertyResolution[T]inherited = => sbt.PropertyResolution[T]inheritedValue
					 // note that the following means the default value will not be used if an exception occurs inheriting
					sbt.PropertyResolution[T]inherited (=> sbt.PropertyResolution[T])sbt.PropertyResolution[T]orElse
					{
						=> Option[T]defaultValue sbt.PropertyResolution[T]match
						{
							sbt.DefinedValue[T]case Some(Tv) => (T,Boolean,Boolean)sbt.DefinedValue[T]DefinedValue(Tv, Boolean(false)false, Boolean(true)true)
							sbt.PropertyResolution[T]case object NoneNone => sbt.PropertyResolution[T]inherited
						}
					}
			}
		private def => sbt.PropertyResolution[T]resolveDefaultFirst =
			(=> Option[T]explicitValue (=> Option[T])Option[T]orElse => Option[T]defaultValue) sbt.PropertyResolution[T]match
			{
				sbt.DefinedValue[T]case Some(Tv) => (T,Boolean,Boolean)sbt.DefinedValue[T]DefinedValue(Tv, Boolean(false)false, => Option[T]explicitValue.=> BooleanisEmpty)
				sbt.PropertyResolution[T]case object NoneNone => => sbt.PropertyResolution[T]inheritedValue
			}
		
		private def => sbt.PropertyResolution[T]inheritedValue: sbt.PropertyResolution[T]PropertyResolution[T] =
		{
			val Option[sbt.BasicEnvironment#UserProperty[_]]propOption = Option[sbt.BasicEnvironment#UserProperty[_]]if(BooleaninheritEnabled) => Option[sbt.BasicEnvironment#UserProperty[_]]parentProperty else object NoneNone
			Option[sbt.BasicEnvironment#UserProperty[_]]propOption sbt.PropertyResolution[T]match
			{
				sbt.PropertyResolution[T]case Some(sbt.BasicEnvironment#UserProperty[?]prop) => (sbt.BasicEnvironment#UserProperty[Nothing])sbt.PropertyResolution[T]tryToInherit(sbt.BasicEnvironment#UserProperty[?]prop)
				sbt.UndefinedValuecase object NoneNone => (String,String)sbt.UndefinedValueUndefinedValue(=> StringnameString, => java.lang.StringenvironmentLabel)
			}
		}
		private def => Option[sbt.BasicEnvironment#UserProperty[_]]parentProperty = for(((sbt.BasicEnvironment) => Option[sbt.BasicEnvironment#UserProperty[_]])Option[sbt.BasicEnvironment#UserProperty[_]]parent <- => Option[sbt.BasicEnvironment]parentEnvironment; ((String) => Option[parent.UserProperty[_]])Option[parent.UserProperty[_]]n <- => Option[String]name; ((parent.AnyUserProperty) => parent.UserProperty[_])Option[parent.UserProperty[_]]prop <- sbt.BasicEnvironmentparent.=> scala.collection.mutable.HashMap[String,parent.AnyUserProperty]propertyMap.(String)Option[parent.AnyUserProperty]get(Stringn)) yield parent.AnyUserPropertyprop
		
		private def [R](sbt.BasicEnvironment#UserProperty[R])sbt.PropertyResolution[T]tryToInherit[>: Nothing <: AnyR](sbt.BasicEnvironment#UserProperty[R]prop: BasicEnvironment#sbt.BasicEnvironment#UserProperty[R]UserProperty[R]): sbt.PropertyResolution[T]PropertyResolution[T] =
		{
			sbt.PropertyResolution[T]if(sbt.BasicEnvironment#UserProperty[R]prop.=> scala.reflect.Manifest[R]manifest (scala.reflect.Manifest[_])Boolean<:< => scala.reflect.Manifest[T]manifest)
				(sbt.PropertyResolution[T])sbt.PropertyResolution[T]markInherited(sbt.BasicEnvironment#UserProperty[R]prop.=> sbt.PropertyResolution[R]resolve.sbt.PropertyResolution[T]asInstanceOf[sbt.PropertyResolution[T]PropertyResolution[T]])
			else
				(String,Option[Throwable])sbt.ResolutionExceptionResolutionException(java.lang.String("Could not inherit property '")"Could not inherit property '" (Any)java.lang.String+ => StringnameString (Any)java.lang.String+ java.lang.String("' from '")"' from '" (Any)java.lang.String+ => java.lang.StringenvironmentLabel (Any)java.lang.String+ java.lang.String("':\012")"':\n" (Any)java.lang.String+
					java.lang.String("\011 Property had type ")"\t Property had type " (Any)java.lang.String+ sbt.BasicEnvironment#UserProperty[R]prop.=> scala.reflect.Manifest[R]manifest (Any)java.lang.String+ java.lang.String(", expected type ")", expected type " (Any)java.lang.String+ => scala.reflect.Manifest[T]manifest, object NoneNone)
		}
		private def (sbt.PropertyResolution[T])sbt.PropertyResolution[T]markInherited(sbt.PropertyResolution[T]result: sbt.PropertyResolution[T]PropertyResolution[T]) =
			sbt.PropertyResolution[T]result sbt.PropertyResolution[T]match
			{
				sbt.DefinedValue[T]case DefinedValue(Tv, BooleanisInherited, BooleanisDefault) => (T,Boolean,Boolean)sbt.DefinedValue[T]DefinedValue(Tv, Boolean(true)true, BooleanisDefault)
				sbt.PropertyResolution[T]case sbt.PropertyResolution[T]x => sbt.PropertyResolution[T]x
			}
			
		override def ()java.lang.StringtoString = => StringnameString (Any)java.lang.String+ java.lang.String("=")"=" (Any)java.lang.String+ => sbt.PropertyResolution[T]resolve
		
		/** Gets the explicitly set value converted to a 'String'.*/
		private[sbt] def => Option[String]getStringValue: Option[String]Option[String] = => Option[T]explicitValue.((T) => String)Option[String]map(sbt.Format[T]format.(T)StringtoString)
		/** Explicitly sets the value for this property by converting the given string value.*/
		private[sbt] def (String)UnitsetStringValue(Strings: StringString) { (T)Unitupdate(sbt.Format[T]format.(String)TfromString(Strings)) }
	}
	/** Implementation of 'Property' for system properties (i.e. System.getProperty/setProperty) */
	private class class SystemProperty[T] extends BasicEnvironment.this.Property[T] with ScalaObjectSystemProperty[>: Nothing <: AnyT](val Stringname: StringString, => Option[T]lazyDefaultValue: => Option[T], val sbt.Format[T]format: sbt.Format[T]Format[T]) extends BasicEnvironment.this.Property[T]Property[T]
	{
		def => sbt.PropertyResolution[T]resolve =
		{
			val java.lang.StringrawValue = object java.lang.SystemSystem.(java.lang.String)java.lang.StringgetProperty(=> Stringname)
			sbt.PropertyResolution[T]if(java.lang.StringrawValue (AnyRef)Boolean== Null(null)null)
				=> <refinement> extends Product with sbt.PropertyResolution[T]notFound
			else
			{
				object sbt.ControlControl.(=> T)Either[Exception,T]convertException(=> sbt.Format[T]format.(String)TfromString(java.lang.StringrawValue)) sbt.PropertyResolution[T]match
				{
					sbt.ResolutionExceptioncase Left(Exceptione) => (String,Option[Throwable])sbt.ResolutionExceptionResolutionException(java.lang.String("Error parsing system property '")"Error parsing system property '" (Any)java.lang.String+ => Stringname (Any)java.lang.String+ java.lang.String("': ")"': " (Any)java.lang.String+ Exceptione.()java.lang.StringtoString, (Exception)Some[Exception]Some(Exceptione))
					sbt.DefinedValue[T]case Right(Tx) => (T,Boolean,Boolean)sbt.DefinedValue[T]DefinedValue(Tx, Boolean(false)false, Boolean(false)false)
				}
			}
		}
		/** Handles resolution when the property has no explicit value.  If there is a default value, that is returned,
		* otherwise, UndefinedValue is returned.*/
		private def => <refinement> extends Product with sbt.PropertyResolution[T]notFound =
		{
			=> Option[T]defaultValue <refinement> extends Product with sbt.PropertyResolution[T]match
			{
				sbt.DefinedValue[T]case Some(Tdv) =>
				{
					=> sbt.Loggerlog.(=> String)Unitdebug(java.lang.String("System property '")"System property '" (Any)java.lang.String+ => Stringname (Any)java.lang.String+ java.lang.String("' does not exist, using provided default.")"' does not exist, using provided default.")
					(T,Boolean,Boolean)sbt.DefinedValue[T]DefinedValue(Tdv, Boolean(false)false, Boolean(true)true)
				}
				sbt.UndefinedValuecase object NoneNone => (String,String)sbt.UndefinedValueUndefinedValue(=> Stringname, => java.lang.StringenvironmentLabel)
			}
		}
		protected lazy val Option[T]defaultValue = => Option[T]lazyDefaultValue
		def (T)Unitupdate(Tt: TT)
		{
			for(((Exception) => Unit)Unite <- object sbt.ControlControl.(=> java.lang.String)Either[Exception,java.lang.String]convertException(object java.lang.SystemSystem.(java.lang.String,java.lang.String)java.lang.StringsetProperty(=> Stringname, => sbt.Format[T]format.(T)StringtoString(Tt))).=> Either.LeftProjection[Exception,java.lang.String]left)
			{
				=> sbt.Loggerlog.(=> Throwable)Unittrace(Exceptione)
				=> sbt.Loggerlog.(=> String)Unitwarn(java.lang.String("Error setting system property '")"Error setting system property '" (Any)java.lang.String+ => Stringname (Any)java.lang.String+ java.lang.String("': ")"': " (Any)java.lang.String+ Exceptione.()java.lang.StringtoString)
			}
		}
		override def ()java.lang.StringtoString = => Stringname (Any)java.lang.String+ java.lang.String("=")"=" (Any)java.lang.String+ => sbt.PropertyResolution[T]resolve
	}
	
	def [T](String)(implicit sbt.Format[T])BasicEnvironment.this.Property[T]system[>: Nothing <: AnyT](StringpropertyName: StringString)(implicit sbt.Format[T]format: sbt.Format[T]Format[T]): BasicEnvironment.this.Property[T]Property[T] =
		BasicEnvironment.this.SystemProperty[T]new BasicEnvironment.this.SystemProperty[T]SystemProperty[T](StringpropertyName, object NoneNone, sbt.Format[T]format)
	def [T](String,=> T)(implicit sbt.Format[T])BasicEnvironment.this.Property[T]systemOptional[>: Nothing <: AnyT](StringpropertyName: StringString, => TdefaultValue: => T)(implicit sbt.Format[T]format: sbt.Format[T]Format[T]): BasicEnvironment.this.Property[T]Property[T] =
		BasicEnvironment.this.SystemProperty[T]new BasicEnvironment.this.SystemProperty[T]SystemProperty[T](StringpropertyName, (T)Some[T]Some(=> TdefaultValue), sbt.Format[T]format)
	
	def [T](implicit scala.reflect.Manifest[T],sbt.Format[T])BasicEnvironment.this.Property[T]property[>: Nothing <: AnyT](implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T], sbt.Format[T]format: sbt.Format[T]Format[T]): BasicEnvironment.this.Property[T]Property[T] =
		BasicEnvironment.this.UserProperty[T]new BasicEnvironment.this.UserProperty[T]UserProperty[T](object NoneNone, sbt.Format[T]format, Boolean(true)true, Boolean(false)false, scala.reflect.Manifest[T]manifest)
	def [T](implicit scala.reflect.Manifest[T],sbt.Format[T])BasicEnvironment.this.Property[T]propertyLocal[>: Nothing <: AnyT](implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T], sbt.Format[T]format: sbt.Format[T]Format[T]): BasicEnvironment.this.Property[T]Property[T] =
		BasicEnvironment.this.UserProperty[T]new BasicEnvironment.this.UserProperty[T]UserProperty[T](object NoneNone, sbt.Format[T]format, Boolean(false)false, Boolean(false)false, scala.reflect.Manifest[T]manifest)
	def [T](=> T)(implicit scala.reflect.Manifest[T],sbt.Format[T])BasicEnvironment.this.Property[T]propertyOptional[>: Nothing <: AnyT](=> TdefaultValue: => T)(implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T], sbt.Format[T]format: sbt.Format[T]Format[T]): BasicEnvironment.this.Property[T]Property[T] =
		(=> T,Boolean)(implicit scala.reflect.Manifest[T],sbt.Format[T])BasicEnvironment.this.Property[T]propertyOptional(=> TdefaultValue, Boolean(false)false)(scala.reflect.Manifest[T]manifest, sbt.Format[T]format)
	def [T](=> T,Boolean)(implicit scala.reflect.Manifest[T],sbt.Format[T])BasicEnvironment.this.Property[T]propertyOptional[>: Nothing <: AnyT](=> TdefaultValue: => T, BooleaninheritFirst: BooleanBoolean)(implicit scala.reflect.Manifest[T]manifest: scala.reflect.Manifest[T]Manifest[T], sbt.Format[T]format: sbt.Format[T]Format[T]): BasicEnvironment.this.Property[T]Property[T] =
		BasicEnvironment.this.UserProperty[T]new BasicEnvironment.this.UserProperty[T]UserProperty[T]((T)Some[T]Some(=> TdefaultValue), sbt.Format[T]format, Boolean(true)true, BooleaninheritFirst, scala.reflect.Manifest[T]manifest)
	
	private type BasicEnvironment.this.UserProperty[_]AnyUserProperty = BasicEnvironment.this.UserProperty[_]UserProperty[_]
	/** Maps property name to property.  The map is populated by 'initializeEnvironment'.*/
	private val scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap = scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]new scala.collection.mutable.scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]HashMap[String, AnyUserProperty]
	
	import java.util.Properties
	/** Initializes 'propertyMap' by reflectively listing the vals on this object that
	* reference a UserProperty. */
	private[sbt] def ()UnitinitializeEnvironment()
	{
		// AnyProperty is required because the return type of the property*[T] methods is Property[T]
		// and so the vals we are looking for have type Property[T] and not UserProperty[T]
		// We then only keep instances of UserProperty
		type BasicEnvironment.this.Property[_]AnyProperty = BasicEnvironment.this.Property[_]Property[_]
		val scala.collection.Map[String,AnyProperty]vals = object sbt.EnvironmentEnvironment.(AnyRef,Class[AnyProperty])scala.collection.Map[String,AnyProperty]reflectiveMappings(sbt.BasicEnvironmentthis, java.lang.Class[AnyProperty]classOf[AnyProperty])
		for( (((String, AnyProperty)) => Unit)Unit(Stringname, BasicEnvironment.this.AnyUserPropertyproperty: BasicEnvironment.this.AnyUserPropertyAnyUserProperty) <- scala.collection.Map[String,AnyProperty]vals)
			=> scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap(Stringname) = BasicEnvironment.this.AnyUserPropertyproperty
		
		val java.util.Propertiesproperties = java.util.Propertiesnew java.util.PropertiesProperties
		for(((String) => Unit)UniterrorMsg <- object sbt.PropertiesUtilitiesPropertiesUtilities.(java.util.Properties,sbt.Path,sbt.Logger)Option[String]load(java.util.Propertiesproperties, => sbt.PathenvBackingPath, => sbt.Loggerlog))
			=> sbt.Loggerlog.(=> String)Uniterror(java.lang.String("Error loading properties from ")"Error loading properties from " (Any)java.lang.String+ => java.lang.StringenvironmentLabel (Any)java.lang.String+ java.lang.String(" : ")" : " (Any)java.lang.String+ StringerrorMsg)
		
		for(((String) => Unit)Unitname <- object sbt.PropertiesUtilitiesPropertiesUtilities.(java.util.Properties)Iterable[String]propertyNames(java.util.Propertiesproperties))
		{
			val java.lang.StringpropertyValue = java.util.Propertiesproperties.(java.lang.String)java.lang.StringgetProperty(Stringname)
			=> scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap.(String)Option[BasicEnvironment.this.AnyUserProperty]get(Stringname) Unitmatch
			{
				Unitcase Some(BasicEnvironment.this.UserProperty[?]property) => BasicEnvironment.this.UserProperty[?]property.(String)UnitsetStringValue(java.lang.StringpropertyValue)
				Unitcase object NoneNone =>
				{
					val BasicEnvironment.this.UserProperty[String]p = BasicEnvironment.this.UserProperty[String]new BasicEnvironment.this.UserProperty[String]UserProperty[String](object NoneNone, => sbt.Format[String]StringFormat, Boolean(false)false, Boolean(false)false, object scala.reflect.ManifestManifest.(Class[String])scala.reflect.Manifest[String]classType(java.lang.Class[String]classOf[String]))
					BasicEnvironment.this.UserProperty[String]p() = java.lang.StringpropertyValue
					=> scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap(Stringname) = BasicEnvironment.this.UserProperty[String]p
					=> sbt.Loggerlog.(=> String)Unitwarn(java.lang.String("Property '")"Property '" (Any)java.lang.String+ Stringname (Any)java.lang.String+ java.lang.String("' from ")"' from " (Any)java.lang.String+ => java.lang.StringenvironmentLabel (Any)java.lang.String+ java.lang.String(" is not used.")" is not used.")
				}
			}
		}
		(Boolean)UnitsetEnvironmentModified(Boolean(false)false)
	}
	def => Iterable[String]propertyNames: Iterable[String]Iterable[String] = => scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap.=> Iterator[String]keys.=> List[String]toList
	def (String)Option[BasicEnvironment.this.UserProperty[_]]getPropertyNamed(Stringname: StringString): Option[BasicEnvironment.this.UserProperty[_]]Option[UserProperty[_]] = => scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap.(String)Option[BasicEnvironment.this.AnyUserProperty]get(Stringname)
	def (String)BasicEnvironment.this.UserProperty[_]propertyNamed(Stringname: StringString): BasicEnvironment.this.UserProperty[_]UserProperty[_] = (String)BasicEnvironment.this.AnyUserPropertypropertyMap(Stringname)
	def ()Option[String]saveEnvironment(): Option[String]Option[String] =
	{
		Option[String]if(=> BooleanisEnvironmentModified)
		{
			val java.util.Propertiesproperties = java.util.Propertiesnew java.util.PropertiesProperties
			for( (((String, BasicEnvironment.this.AnyUserProperty)) => Unit)Unit(Stringname, BasicEnvironment.this.UserProperty[?]variable) <- => scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap; ((String) => Unit)UnitstringValue <- BasicEnvironment.this.UserProperty[?]variable.=> Option[String]getStringValue)
				java.util.Propertiesproperties.(java.lang.String,java.lang.String)java.lang.ObjectsetProperty(Stringname, StringstringValue)
			val Option[String]result = object sbt.PropertiesUtilitiesPropertiesUtilities.(java.util.Properties,String,sbt.Path,sbt.Logger)Option[String]write(java.util.Propertiesproperties, java.lang.String("Project properties")"Project properties", => sbt.PathenvBackingPath, => sbt.Loggerlog)
			(Boolean)UnitsetEnvironmentModified(Boolean(false)false)
			Option[String]result
		}
		else
			object NoneNone
	}
	private[sbt] def => Iterable[(String, BasicEnvironment.this.Property[_])]uninitializedProperties: Iterable[(String, BasicEnvironment.this.Property[_])]Iterable[(String, Property[_])] = => scala.collection.mutable.HashMap[String,BasicEnvironment.this.AnyUserProperty]propertyMap.(((String, BasicEnvironment.this.AnyUserProperty)) => Boolean)Iterable[(String, BasicEnvironment.this.AnyUserProperty)]filter((String, BasicEnvironment.this.AnyUserProperty)_.=> BasicEnvironment.this.AnyUserProperty_2.=> Option[Any]get.=> BooleanisEmpty)
	
	
	implicit val sbt.Format[Int]IntFormat: sbt.Format[Int]Format[Int] = template $anon extends sbt.SimpleFormat[Int]new sbt.SimpleFormat[Int]SimpleFormat[Int] { def (String)IntfromString(Strings: StringString) = java.lang.object java.lang.IntegerInteger.(java.lang.String)IntparseInt(Strings) }
	implicit val sbt.Format[Long]LongFormat: sbt.Format[Long]Format[Long] = template $anon extends sbt.SimpleFormat[Long]new sbt.SimpleFormat[Long]SimpleFormat[Long] { def (String)LongfromString(Strings: StringString) = java.lang.object java.lang.LongLong.(java.lang.String)LongparseLong(Strings) }
	implicit val sbt.Format[Double]DoubleFormat: sbt.Format[Double]Format[Double] = template $anon extends sbt.SimpleFormat[Double]new sbt.SimpleFormat[Double]SimpleFormat[Double] { def (String)DoublefromString(Strings: StringString) = java.lang.object java.lang.DoubleDouble.(java.lang.String)DoubleparseDouble(Strings) }
	implicit val sbt.Format[Boolean]BooleanFormat: sbt.Format[Boolean]Format[Boolean] = template $anon extends sbt.SimpleFormat[Boolean]new sbt.SimpleFormat[Boolean]SimpleFormat[Boolean] { def (String)BooleanfromString(Strings: StringString) = java.lang.object java.lang.BooleanBoolean.(java.lang.String)java.lang.BooleanvalueOf(Strings).()BooleanbooleanValue }
	implicit val sbt.Format[String]StringFormat: sbt.Format[String]Format[String] = template $anon extends sbt.SimpleFormat[String]new sbt.SimpleFormat[String]SimpleFormat[String] { def (String)StringfromString(Strings: StringString) = Strings }
	val sbt.Format[String]NonEmptyStringFormat: sbt.Format[String]Format[String] = template $anon extends sbt.SimpleFormat[String]new sbt.SimpleFormat[String]SimpleFormat[String]
	{
		def (String)StringfromString(Strings: StringString) =
		{
			val java.lang.Stringtrimmed = Strings.()java.lang.Stringtrim
			Stringif(implicit scala.Predef.stringWrapper : (String)scala.runtime.RichStringtrimmed.=> BooleanisEmpty)
				Nothingthrow (java.lang.String)java.lang.RuntimeExceptionnew java.lang.RuntimeExceptionRuntimeException(java.lang.String("The empty string is not allowed.")"The empty string is not allowed.")
			else
				java.lang.Stringtrimmed
		}
	}
	implicit val sbt.Format[sbt.Version]VersionFormat: sbt.Format[sbt.Version]Format[Version] =
		template $anon extends sbt.SimpleFormat[sbt.Version]new sbt.SimpleFormat[sbt.Version]SimpleFormat[Version]
		{
			def (String)sbt.VersionfromString(Strings: StringString) = object sbt.VersionVersion.(String)Either[String,sbt.Version]fromString(Strings).((String) => sbt.Version,(sbt.Version) => sbt.Version)sbt.Versionfold(Stringmsg => Nothingthrow (java.lang.String)java.lang.RuntimeExceptionnew java.lang.RuntimeExceptionRuntimeException(Stringmsg), sbt.Versionx => sbt.Versionx)
		}
	import java.io.File
	implicit val sbt.Format[java.io.File]FileFormat: sbt.Format[java.io.File]Format[File] =
		template $anon extends java.lang.Object with sbt.Format[java.io.File]new sbt.Format[java.io.File]Format[File]
		{
			def (String)java.io.FilefromString(Strings: StringString) = (java.io.Filenew java.io.FileFile(Strings)).()java.io.FilegetCanonicalFile
			def (java.io.File)java.lang.StringtoString(java.io.Filef: java.io.FileFile) = java.io.Filef.()java.lang.StringgetCanonicalPath
		}
}
private object object sbt.EnvironmentEnvironment
{
	def [T](AnyRef,Class[T])scala.collection.Map[String,T]reflectiveMappings[>: Nothing <: AnyT](AnyRefobj: AnyRefAnyRef, Class[T]clazz: Class[T]Class[T]): scala.collection.Map[String,T]Map[String, T] =
	{
		val scala.collection.mutable.OpenHashMap[String,T]mappings = ()scala.collection.mutable.OpenHashMap[String,T]new scala.collection.mutable.scala.collection.mutable.OpenHashMap[String,T]OpenHashMap[String, T]
		for ((((String, T)) => Unit)Unit(Stringname, Tvalue) <- object sbt.ReflectUtilitiesReflectUtilities.(AnyRef,Class[T])scala.collection.Map[String,T]allValsC(AnyRefobj, Class[T]clazz))
			scala.collection.mutable.OpenHashMap[String,T]mappings(object sbt.ReflectUtilitiesReflectUtilities.(String,Char)StringtransformCamelCase(Stringname, Char('.')'.')) = Tvalue
		scala.collection.mutable.OpenHashMap[String,T]mappings
	}
	def => java.lang.StringscalaVersionString = scala.tools.nsc.object scala.tools.nsc.PropertiesProperties.=> java.lang.StringversionString
}

sealed trait trait PropertyResolution[+T] extends java.lang.Object with NotNullPropertyResolution[+>: Nothing <: AnyT] extends NotNullNotNull
{
	def => Tvalue: TT
	def [R >: T](=> sbt.PropertyResolution[R])sbt.PropertyResolution[R]orElse[>: T <: AnyR >: T](=> sbt.PropertyResolution[R]r: => PropertyResolution[R]): sbt.PropertyResolution[R]PropertyResolution[R]
	def => Option[T]toOption: Option[T]Option[T]
	def ((T) => Unit)Unitforeach((T) => Unitf: T => Unit): UnitUnit
	def [R]((T) => R)sbt.PropertyResolution[R]map[>: Nothing <: AnyR]((T) => Rf: T => R): sbt.PropertyResolution[R]PropertyResolution[R]
	def [R]((T) => sbt.PropertyResolution[R])sbt.PropertyResolution[R]flatMap[>: Nothing <: AnyR]((T) => sbt.PropertyResolution[R]f: T => PropertyResolution[R]): sbt.PropertyResolution[R]PropertyResolution[R]
}
sealed trait trait NoPropertyValue extends java.lang.Object with sbt.PropertyResolution[Nothing] with ScalaObjectNoPropertyValue extends sbt.PropertyResolution[Nothing]PropertyResolution[Nothing]
{ self: RuntimeException with PropertyResolution[Nothing] =>

	def => Nothingvalue = Nothingthrow <refinement> extends sbt.NoPropertyValue with RuntimeException with sbt.PropertyResolution[Nothing]this
	def => object NonetoOption = object NoneNone
	def [R]((Nothing) => R)sbt.PropertyResolution[R]map[>: Nothing <: AnyR]((Nothing) => Rf: Nothing => R): sbt.PropertyResolution[R]PropertyResolution[R] = <refinement> extends sbt.NoPropertyValue with RuntimeException with sbt.PropertyResolution[Nothing]this
	def [R]((Nothing) => sbt.PropertyResolution[R])sbt.PropertyResolution[R]flatMap[>: Nothing <: AnyR]((Nothing) => sbt.PropertyResolution[R]f: Nothing => PropertyResolution[R]): sbt.PropertyResolution[R]PropertyResolution[R] = <refinement> extends sbt.NoPropertyValue with RuntimeException with sbt.PropertyResolution[Nothing]this
	def ((Nothing) => Unit)Unitforeach((Nothing) => Unitf: Nothing => Unit) Unit{}
}
final case class class ResolutionException extends java.lang.RuntimeException with sbt.NoPropertyValue with ScalaObject with ProductResolutionException(Stringmessage: StringString, Option[Throwable]exception: Option[Throwable]Option[Throwable])
	extends java.lang.RuntimeExceptionRuntimeException(Stringmessage, Option[Throwable]exception.(=> Throwable)ThrowablegetOrElse(Null(null)null)) with sbt.NoPropertyValueNoPropertyValue
{
	def [R](=> sbt.PropertyResolution[R])sbt.ResolutionExceptionorElse[>: Nothing <: AnyR](=> sbt.PropertyResolution[R]r: => PropertyResolution[R]) = sbt.ResolutionExceptionthis
}
final case class class UndefinedValue extends java.lang.RuntimeException with sbt.NoPropertyValue with ScalaObject with ProductUndefinedValue(Stringname: StringString, StringenvironmentLabel: StringString)
	extends java.lang.RuntimeExceptionRuntimeException(java.lang.String("Value for property '")"Value for property '" (Any)java.lang.String+ Stringname (Any)java.lang.String+ java.lang.String("' from ")"' from " (Any)java.lang.String+ StringenvironmentLabel (Any)java.lang.String+ java.lang.String(" is undefined.")" is undefined.") with sbt.NoPropertyValueNoPropertyValue
{
	def [R](=> sbt.PropertyResolution[R])sbt.PropertyResolution[R]orElse[>: Nothing <: AnyR](=> sbt.PropertyResolution[R]r: => PropertyResolution[R]) =
		=> sbt.PropertyResolution[R]r sbt.PropertyResolution[R]match
		{
			sbt.UndefinedValuecase sbt.UndefinedValueu: sbt.UndefinedValueUndefinedValue => sbt.UndefinedValuethis
			sbt.PropertyResolution[R]case _ => => sbt.PropertyResolution[R]r
		}
}
final case class class DefinedValue[T] extends java.lang.Object with sbt.PropertyResolution[T] with ScalaObject with ProductDefinedValue[>: Nothing <: AnyT](Tvalue: TT, BooleanisInherited: BooleanBoolean, BooleanisDefault: BooleanBoolean) extends sbt.PropertyResolution[T]PropertyResolution[T]
{
	def => Some[T]toOption = (T)Some[T]Some(=> Tvalue)
	def [R >: T](=> sbt.PropertyResolution[R])sbt.DefinedValue[T]orElse[>: T <: AnyR >: T](=> sbt.PropertyResolution[R]r: => PropertyResolution[R]) = sbt.DefinedValue[T]this
	def [R]((T) => R)sbt.DefinedValue[R]map[>: Nothing <: AnyR]((T) => Rf: T => R) = (R,Boolean,Boolean)sbt.DefinedValue[R]DefinedValue[RR]((T)Rf(=> Tvalue), => BooleanisInherited, => BooleanisDefault)
	def [R]((T) => sbt.PropertyResolution[R])sbt.PropertyResolution[R]flatMap[>: Nothing <: AnyR]((T) => sbt.PropertyResolution[R]f: T => PropertyResolution[R]) = (T)sbt.PropertyResolution[R]f(=> Tvalue)
	def ((T) => Unit)Unitforeach((T) => Unitf: T => Unit) { (T)Unitf(=> Tvalue) }
}