diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/manual/scala/man1/scalap.scala | 6 | ||||
-rw-r--r-- | src/scala-lang.iml (renamed from src/Scala-lang.iml) | 16 | ||||
-rw-r--r-- | src/scalap/scala/tools/scalap/Main.scala | 6 | ||||
-rw-r--r-- | src/scalap/scala/tools/scalap/Properties.scala | 4 | ||||
-rw-r--r-- | src/scalap/scala/tools/scalap/decoder.properties | 2 | ||||
-rw-r--r-- | src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala | 7 |
6 files changed, 31 insertions, 10 deletions
diff --git a/src/manual/scala/man1/scalap.scala b/src/manual/scala/man1/scalap.scala index 7d780ffdb8..465bc79037 100644 --- a/src/manual/scala/man1/scalap.scala +++ b/src/manual/scala/man1/scalap.scala @@ -18,7 +18,7 @@ object scalap extends Command { val synopsis = Section("SYNOPSIS", - CmdLine(" [ " & Argument("options") & " ] " & Argument("source file"))) + CmdLine(" [ " & Argument("options") & " ] " & Argument("class name"))) val parameters = Section("PARAMETERS", @@ -28,8 +28,8 @@ object scalap extends Command { "Command line options. See " & Link(Bold("OPTIONS"), "#options") & " below."), Definition( - Mono(Argument("source file")), - "One class file to be decoded (such as " & + Mono(Argument("class name")), + "Full-qualified name of a class to be decoded (such as " & Mono("hello.HelloWorld") & ")."))) val description = Section("DESCRIPTION", diff --git a/src/Scala-lang.iml b/src/scala-lang.iml index 0d23d1a719..365c7cd7f7 100644 --- a/src/Scala-lang.iml +++ b/src/scala-lang.iml @@ -12,13 +12,29 @@ <sourceFolder url="file://$MODULE_DIR$/compiler" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/dbc" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/library" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/manual" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/partest" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/scalap" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/swing" isTestSource="false" /> + <excludeFolder url="file://$MODULE_DIR$/android-library" /> + <excludeFolder url="file://$MODULE_DIR$/cldc-library" /> + <excludeFolder url="file://$MODULE_DIR$/dotnet-library" /> + <excludeFolder url="file://$MODULE_DIR$/jvm14-library" /> + <excludeFolder url="file://$MODULE_DIR$/mono" /> </content> <orderEntry type="library" name="lib1" level="project" /> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="ant" level="project" /> + <orderEntry type="module-library"> + <library name="my_ant"> + <CLASSES> + <root url="jar://$MODULE_DIR$/../../ant/ant.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> </component> </module> diff --git a/src/scalap/scala/tools/scalap/Main.scala b/src/scalap/scala/tools/scalap/Main.scala index 6e91e00234..71b93835e6 100644 --- a/src/scalap/scala/tools/scalap/Main.scala +++ b/src/scalap/scala/tools/scalap/Main.scala @@ -22,11 +22,12 @@ object Main { val SCALA_SIG = "ScalaSig" val versionMsg = "Scala classfile decoder " + Properties.versionString + " -- " + - Properties.copyrightString + Properties.copyrightString + "\n" /**Verbose program run? */ var verbose = false + var printPrivates = false /**Prints usage information for scalap. */ @@ -74,7 +75,7 @@ object Main { case _ => } // Print classes - val printer = new ScalaSigPrinter(stream) + val printer = new ScalaSigPrinter(stream, printPrivates) for (c <- syms) { printer.printSymbol(c) } @@ -246,6 +247,7 @@ object Main { if (arguments contains "-help") usage verbose = arguments contains "-verbose" + printPrivates = arguments contains "-private" // construct a custom class path val classPath0 = new ClassPath(false) val path = arguments.getArgument("-classpath") match { diff --git a/src/scalap/scala/tools/scalap/Properties.scala b/src/scalap/scala/tools/scalap/Properties.scala index 1c23626aae..0be23d351d 100644 --- a/src/scalap/scala/tools/scalap/Properties.scala +++ b/src/scalap/scala/tools/scalap/Properties.scala @@ -15,7 +15,7 @@ package scala.tools.scalap object Properties { /** The name of the properties file */ - private val propFilename = "/decoder.properties" + private val propFilename = "decoder.properties" /** The loaded properties */ private val props = { @@ -35,7 +35,7 @@ object Properties { } val copyrightString: String = { - val defaultString = "(c) 2002-2006 LAMP/EPFL" + val defaultString = "(c) 2002-2009 LAMP/EPFL" props.getProperty("copyright.string", defaultString) } diff --git a/src/scalap/scala/tools/scalap/decoder.properties b/src/scalap/scala/tools/scalap/decoder.properties new file mode 100644 index 0000000000..2aeb55400c --- /dev/null +++ b/src/scalap/scala/tools/scalap/decoder.properties @@ -0,0 +1,2 @@ +version.number=2.0.1 +copyright.string=(c) 2002-2009 LAMP/EPFL diff --git a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala index abdb28e1f7..94a15b1c85 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala @@ -5,7 +5,7 @@ import java.io.{PrintStream, ByteArrayOutputStream} import util.StringUtil import java.util.regex.Pattern -class ScalaSigPrinter(stream: PrintStream) { +class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) { import stream._ val CONSTRUCTOR_NAME = "<init>" @@ -15,7 +15,8 @@ class ScalaSigPrinter(stream: PrintStream) { def printSymbol(symbol: Symbol) {printSymbol(0, symbol)} def printSymbol(level: Int, symbol: Symbol) { - if (!symbol.isLocal) { + if (!symbol.isLocal && + !(symbol.isPrivate && !printPrivates)) { def indent() {for (i <- 1 to level) print(" ")} symbol match { @@ -104,7 +105,7 @@ class ScalaSigPrinter(stream: PrintStream) { case Some(m: MethodSymbol) => { val baos = new ByteArrayOutputStream val stream = new PrintStream(baos) - val printer = new ScalaSigPrinter(stream) + val printer = new ScalaSigPrinter(stream, printPrivates) printer.printMethodType(m.infoType, false) baos.toString } |