summaryrefslogtreecommitdiff
path: root/src/library/scala/util/Properties.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/util/Properties.scala')
-rw-r--r--src/library/scala/util/Properties.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala
index d2c9e6770b..998661895b 100644
--- a/src/library/scala/util/Properties.scala
+++ b/src/library/scala/util/Properties.scala
@@ -10,11 +10,16 @@
package scala.util
import java.io.{ IOException, PrintWriter }
+import java.util.jar.Attributes.{ Name => AttributeName }
/** Loads `library.properties` from the jar. */
object Properties extends PropertiesTrait {
protected def propCategory = "library"
protected def pickJarBasedOn = classOf[ScalaObject]
+
+ /** Scala manifest attributes.
+ */
+ val ScalaCompilerVersion = new AttributeName("Scala-Compiler-Version")
}
private[scala] trait PropertiesTrait {
@@ -90,6 +95,11 @@ private[scala] trait PropertiesTrait {
Some(s)
}
+ /** Either the development or release version if known, otherwise
+ * the empty string.
+ */
+ def versionNumberString = scalaPropOrEmpty("version.number")
+
/** The version number of the jar this was loaded from plus "version " prefix,
* or "version (unknown)" if it cannot be determined.
*/