final class PackageClassDenotation
extends ClassDenotation

The denotation of a package class. It overrides ClassDenotation to take account of package objects when looking for members

Constructors

PackageClassDenotation ( symbol: Symbol , ownerIfExists: Symbol , name: Name , initFlags: FlagSet , initInfo: Type , initPrivateWithin: Symbol , initRunId: RunId )

Members

private val initFlags : FlagSet
private val initInfo : Type
private val initPrivateWithin : Symbol
private val initRunId : RunId
private val name : Name
private val ownerIfExists : Symbol
private var packageObjCache : SymDenotation
private var packageObjRunId : RunId
private val symbol : Symbol
[+] override def computeNPMembersNamed ( name: Name , inherited: Boolean ) ( implicit ctx: Context ) : PreDenotation

Looks in both the package object and the package for members. The precise algorithm is as follows:

If this is the scala package look in the package firs...

Looks in both the package object and the package for members. The precise algorithm is as follows:

If this is the scala package look in the package first, and if nothing is found there, look in the package object second. Otherwise, look in the package object first, and if nothing is found there, in the package second.

The reason for the special treatment of the scala package is that if we complete it too early, we freeze its superclass Any, so that no members can be entered in it. As a consequence, there should be no entry in the scala package object that hides a class or object in the scala package of the same name, because the behavior would then be unintuitive for such members.

override def memberNames ( keepOnly: NameFilter ) ( implicit ctx: Context ) : Set [ Name ]

The union of the member names of the package and the package object

The union of the member names of the package and the package object

def packageObj ( implicit ctx: Context ) : SymDenotation

The package object in this class, of one exists

The package object in this class, of one exists

override def proceedWithEnter ( sym: Symbol , mscope: MutableScope ) ( implicit ctx: Context ) : Boolean

If another symbol with the same name is entered, unlink it, and, if symbol is a package object, invalidate the packageObj cache.

If another symbol with the same name is entered, unlink it, and, if symbol is a package object, invalidate the packageObj cache.