diff options
Diffstat (limited to 'src/scalap')
-rw-r--r-- | src/scalap/scala/tools/scalap/Properties.scala | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/src/scalap/scala/tools/scalap/Properties.scala b/src/scalap/scala/tools/scalap/Properties.scala index 302b0ec463..05452c448e 100644 --- a/src/scalap/scala/tools/scalap/Properties.scala +++ b/src/scalap/scala/tools/scalap/Properties.scala @@ -9,42 +9,10 @@ package scala.tools.scalap -/** A utility to load the compiler properties from a Java properties file - * included in the jar. - */ -object Properties { - - /** The name of the properties file */ - private val propFilename = "/decoder.properties" - - /** The loaded properties */ - private val props = { - val props = new java.util.Properties - val stream = classOf[Classfile].getResourceAsStream(propFilename) - if (stream != null) - props.load(stream) - props - } - - /** The version number of the jar this was loaded from, or - * "(unknown)" if it cannot be determined. - */ - val versionString: String = { - val defaultString = "(unknown)" - "version " + props.getProperty("version.number") - } - - val copyrightString: String = { - val defaultString = "(c) 2002-2009 LAMP/EPFL" - props.getProperty("copyright.string", defaultString) - } - - val scalaHome: String = - System.getProperty("scala.home") - - val cmdName: String = { - val isWin = System.getProperty("os.name") startsWith "Windows" - if (isWin) "scala.bat" else "scala" - } - -} +/** Loads decoder.properties from the jar. */ +object Properties extends scala.util.PropertiesTrait +{ + protected def propCategory = "decoder" + protected def pickJarBasedOn = classOf[Classfile] + val cmdName = nsc.Properties.cmdName +}
\ No newline at end of file |