scala.tools.nsc 包的用途是什么? [英] What is the purpose of the scala.tools.nsc package?
问题描述
我花了好几个小时在谷歌上搜索可以让我在 Scala 中打开 Zip 文件的东西(我知道你可以只使用 Java API,但我希望为它找到一个对 Scala 友好的包装器,而不是吹毛求疵写Buffered/FileInputstream等)
I've spent a good few hours googling for something to allow me to open Zip files in Scala (I know you can just use the Java API, but I was hoping to find a Scala friendly wrapper for it instead of faffing about writing Buffered/FileInputstream and so on)
所以我只是在 REPL 中乱搞,发现了这个包
So I was just messing about in the REPL and found this package
scala.tools.nsc.io.ZipArchive
经过一些挖掘和使用这个 scala.tools.nsc.io.File
,我设法打开了一个具有所有 Scala 优点的 zip 存档(能够 foreach
代码>等)
Which after some digging and using this scala.tools.nsc.io.File
, I managed to open a zip archive with all of the Scala niceness (being able to foreach
etc)
问题是我在官方 Scala 2.8.1 API 文档中看不到任何提及此包的内容,所以我只是想知道为什么没有关于它的文档?这是什么?
The thing is I can't see any mention of this package in the official Scala 2.8.1 API document, so I was just wondering why there's no documentation on it? What is it?
推荐答案
这个包包含编译器相关的类.它主要用于(据我所知)用于插件创建.
this package contains Compiler-related classes. It's mainly used (as far as I know) for Plugin creation.
由于它与 Scala 编译器有关,我不确定它在哪一点上是稳定的"包以及它在 Scala 版本之间可能会发生多少变化,所以要小心.
Due to it being related to Scala compiler, I'm not sure to which point it is a "stable" package and how much may it change between Scala versions, so be careful there.
这篇关于scala.tools.nsc 包的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!