abstract class Roots extends SymbolTable.RootsBase
- Self Type
- SymbolTable.Roots
- Alphabetic
- By Inheritance
- Roots
- RootsBase
- Mirror
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Roots(rootOwner: SymbolTable.Symbol)
Type Members
-
class
EmptyPackage extends SymbolTable.ModuleSymbol with WellKnownSymbol
The module symbol of the default (unnamed) package
-
class
EmptyPackageClass extends SymbolTable.PackageClassSymbol with WellKnownSymbol
The module class symbol of the default (unnamed) package
-
class
RootClass extends SymbolTable.PackageClassSymbol with RootSymbol
The class symbol of the
_root_
package -
class
RootPackage extends SymbolTable.ModuleSymbol with RootSymbol
The module symbol of the
_root_
package - sealed trait RootSymbol extends SymbolTable.Symbol with WellKnownSymbol with SymbolTable.RootSymbol
- sealed trait WellKnownSymbol extends SymbolTable.Symbol
Abstract Value Members
- abstract def rootLoader: SymbolTable.LazyType
-
abstract
val
universe: Mirrors.this.type
The universe this mirror belongs to.
The universe this mirror belongs to.
- Definition Classes
- Mirror
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
lazy val
EmptyPackage: EmptyPackage
The module symbol of the default (unnamed) package
-
lazy val
EmptyPackageClass: EmptyPackageClass
The module class symbol of the default (unnamed) package
-
lazy val
RootClass: RootClass
The class symbol of the
_root_
package -
lazy val
RootPackage: RootPackage
The module symbol of the
_root_
package -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
erasureName[T](implicit arg0: ClassTag[T]): String
********************** helpers ***********************
********************** helpers ***********************
- Definition Classes
- RootsBase
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findMemberFromRoot(fullName: SymbolTable.Name): SymbolTable.Symbol
- Definition Classes
- RootsBase
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getClassByName(fullname: String): SymbolTable.ClassSymbol
- Definition Classes
- RootsBase
-
def
getClassIfDefined(fullname: String, toName: (String) ⇒ SymbolTable.Name): SymbolTable.Symbol
- Definition Classes
- RootsBase
-
def
getClassIfDefined(fullname: String): SymbolTable.Symbol
- Definition Classes
- RootsBase
-
def
getModuleByName(fullname: String): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
-
def
getModuleIfDefined(fullname: String): SymbolTable.Symbol
- Definition Classes
- RootsBase
-
def
getPackage(fullname: String): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
-
def
getPackageIfDefined(fullname: SymbolTable.TermName): SymbolTable.Symbol
- Definition Classes
- RootsBase
-
def
getPackageObject(fullname: SymbolTable.TermName): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
-
def
getPackageObject(fullname: String): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
-
def
getPackageObjectIfDefined(fullname: SymbolTable.TermName): SymbolTable.Symbol
- Definition Classes
- RootsBase
-
def
getPackageObjectIfDefined(fullname: String): SymbolTable.Symbol
- Definition Classes
- RootsBase
-
def
getRequiredClass(fullname: String): SymbolTable.ClassSymbol
- Definition Classes
- RootsBase
-
def
getRequiredClass(fullname: String, toName: (String) ⇒ SymbolTable.Name): SymbolTable.ClassSymbol
- Definition Classes
- RootsBase
-
def
getRequiredModule(fullname: String): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
init(): Unit
- Definition Classes
- RootsBase
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isMirrorInitialized: Boolean
- Definition Classes
- RootsBase
-
def
mirrorMissingHook(owner: SymbolTable.Symbol, name: SymbolTable.Name): SymbolTable.Symbol
- Attributes
- protected
- Definition Classes
- RootsBase
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
requiredClass[T](implicit arg0: ClassTag[T]): SymbolTable.ClassSymbol
- Definition Classes
- RootsBase
-
def
requiredModule[T](implicit arg0: ClassTag[T]): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
-
def
staticClass(fullname: String): SymbolTable.ClassSymbol
The symbol corresponding to the globally accessible class with the given fully qualified name
fullName
.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: scala.reflect.runtime.universe.ClassSymbol = class List
scala> res0.fullName res1: String = scala.collection.immutable.List
scala> cm.staticPackage("scala") res2: scala.reflect.runtime.universe.ModuleSymbol = package scala
scala> res2.moduleClass.info member TypeName("List") res3: scala.reflect.runtime.universe.Symbol = type List
scala> res3.fullName res4: String = scala.List
To be consistent with Scala name resolution rules, in case of ambiguity between a package and an object, the object is never been considered.
For example for the following code:
package foo { class B }
object foo { class A class B }
staticClass("foo.B") will resolve to the symbol corresponding to the class B declared in the package foo, and staticClass("foo.A") will throw a ScalaReflectionException.
In the example above, to load a symbol that corresponds to the class B declared in the object foo, use staticModule("foo") to load the module symbol and then navigate info.members of its moduleClass.
Unlike getClassByName/getRequiredClass this function can also load packageless symbols. Compiler might ignore them, but they should be loadable with macros.
-
def
staticModule(fullname: String): SymbolTable.ModuleSymbol
The symbol corresponding to the globally accessible object with the given fully qualified name
fullName
.The symbol corresponding to the globally accessible object with the given fully qualified name
fullName
.To be consistent with Scala name resolution rules, in case of ambiguity between a package and an object, the object is never been considered.
For example for the following code:
package foo { object B }
object foo { object A object B }
staticModule("foo.B") will resolve to the symbol corresponding to the object B declared in the package foo, and staticModule("foo.A") will throw a ScalaReflectionException
In the example above, to load a symbol that corresponds to the object B declared in the object foo, use staticModule("foo") to load the module symbol and then navigate info.members of its moduleClass.
Unlike getModule/getRequiredModule this function can also load packageless symbols. Compiler might ignore them, but they should be loadable with macros.
-
def
staticPackage(fullname: String): SymbolTable.ModuleSymbol
The symbol corresponding to a package with the given fully qualified name
fullName
. -
def
symbolOf[T](implicit arg0: SymbolTable.WeakTypeTag[T]): SymbolTable.TypeSymbol
Type symbol of
x
as derived from a type tag. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
typeOf[T](implicit arg0: SymbolTable.TypeTag[T]): SymbolTable.Type
Shortcut for
implicitly[TypeTag[T]].tpe
Shortcut for
implicitly[TypeTag[T]].tpe
- Definition Classes
- Mirror
-
def
universeMissingHook(owner: SymbolTable.Symbol, name: SymbolTable.Name): SymbolTable.Symbol
- Attributes
- protected
- Definition Classes
- RootsBase
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
weakTypeOf[T](implicit arg0: SymbolTable.WeakTypeTag[T]): SymbolTable.Type
Shortcut for
implicitly[WeakTypeTag[T]].tpe
Shortcut for
implicitly[WeakTypeTag[T]].tpe
- Definition Classes
- Mirror
-
final
def
wrapMissing(body: ⇒ SymbolTable.Symbol): SymbolTable.Symbol
- Definition Classes
- RootsBase
- Annotations
- @inline()
Deprecated Value Members
-
def
getClassByName(fullname: SymbolTable.Name): SymbolTable.ClassSymbol
- Definition Classes
- RootsBase
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use overload that accepts a String.
-
def
getClassIfDefined(fullname: SymbolTable.Name): SymbolTable.Symbol
- Definition Classes
- RootsBase
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use overload that accepts a String.
-
def
getModuleByName(fullname: SymbolTable.Name): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use overload that accepts a String.
-
def
getModuleIfDefined(fullname: SymbolTable.Name): SymbolTable.Symbol
- Definition Classes
- RootsBase
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use overload that accepts a String.
-
def
getPackage(fullname: SymbolTable.TermName): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use overload that accepts a String.
-
def
getRequiredPackage(fullname: String): SymbolTable.ModuleSymbol
- Definition Classes
- RootsBase
- Annotations
- @deprecated
- Deprecated
(Since version 2.11.0) use getPackage