diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-17 21:35:24 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-20 10:05:00 +0200 |
commit | 476204b03aa333cc91ed9ee31a69967f22c08650 (patch) | |
tree | cd3b46bcab7259171a7b9cf987c1a6cce7aed419 /src | |
parent | 96036b35698f735fd0e91aead8085519b5c3ce43 (diff) | |
download | scala-476204b03aa333cc91ed9ee31a69967f22c08650.tar.gz scala-476204b03aa333cc91ed9ee31a69967f22c08650.tar.bz2 scala-476204b03aa333cc91ed9ee31a69967f22c08650.zip |
SI-5949 updates documentation of staticClass
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/reflect/base/MirrorOf.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/library/scala/reflect/base/MirrorOf.scala b/src/library/scala/reflect/base/MirrorOf.scala index 03e035cd81..d030ace96c 100644 --- a/src/library/scala/reflect/base/MirrorOf.scala +++ b/src/library/scala/reflect/base/MirrorOf.scala @@ -15,6 +15,24 @@ abstract class MirrorOf[U <: base.Universe with Singleton] { /** The symbol corresponding to the globally accessible class with the * given fully qualified name `fullName`. + * + * If the name points to a type alias, it's recursively dealiased and its target is returned. + * If you need a symbol that corresponds to the type alias itself, load it directly from the package class: + * + * scala> cm.staticClass("scala.List") + * res0: reflect.runtime.universe.ClassSymbol = class List + * + * scala> res0.fullName + * res1: String = scala.collection.immutable.List + * + * scala> cm.staticModule("scala") + * res2: reflect.runtime.universe.ModuleSymbol = package scala + * + * scala> res2.moduleClass.typeSignature member newTypeName("List") + * res3: reflect.runtime.universe.Symbol = type List + * + * scala> res3.fullName + * res4: String = scala.List */ def staticClass(fullName: String): U#ClassSymbol |