class ClassDenotation
extends SymDenotation

The contents of a class definition during a period

Constructors

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

Members

private var baseTypeRefCache : HashMap [ CachedType, Type ]
private var baseTypeRefValid : RunId
private var firstRunId : RunId
private var fullNameCache : SimpleMap [ String, Name ]
private val initFlags : FlagSet
private val initInfo : Type
private val initPrivateWithin : Symbol
private val initRunId : RunId
private var memberNamesCache : SimpleMap [ NameFilter, Set [ Name ] ]
private var myBaseClasses : List [ ClassSymbol ]
private var myMemberCache : LRUCache [ Name, PreDenotation ]
private var myMemberCachePeriod : Period
private var myMemberFingerPrint : FingerPrint
private var mySuperClassBits : BitSet
private var myThisType : Type
private var myTypeParams : List [ TypeSymbol ]

TODO: Document why caches are supposedly safe to use

TODO: Document why caches are supposedly safe to use

private var myTypeRef : TypeRef
private val name : Name
private val ownerIfExists : Symbol
private val symbol : Symbol
def baseClasses ( implicit ctx: Context ) : List [ ClassSymbol ]

The base classes of this class in linearization order, with the class itself as first element.

The base classes of this class in linearization order, with the class itself as first element.

final def baseTypeRefOf ( tp: Type ) ( implicit ctx: Context ) : Type

Compute tp.baseTypeRef(this)

Compute tp.baseTypeRef(this)

private def checkBasesUpToDate ( ) ( implicit ctx: Context ) : Unit

Invalidate baseTypeRefCache, baseClasses and superClassBits on new run

Invalidate baseTypeRefCache, baseClasses and superClassBits on new run

def classInfo ( implicit ctx: Context ) : ClassInfo

The info asserted to have type ClassInfo

The info asserted to have type ClassInfo

def classParents ( implicit ctx: Context ) : List [ TypeRef ]

The denotations of all parents in this class.

The denotations of all parents in this class.

def classSymbol : ClassSymbol

The symbol asserted to have type ClassSymbol

The symbol asserted to have type ClassSymbol

private def computeBases ( implicit ctx: Context ) : ( List [ ClassSymbol ], BitSet )
private def computeMemberFingerPrint ( implicit ctx: Context ) : FingerPrint
def computeNPMembersNamed ( name: Name , inherited: Boolean ) ( implicit ctx: Context ) : PreDenotation
private def computeThisType ( implicit ctx: Context ) : Type
def delete ( sym: Symbol ) ( implicit ctx: Context ) : Unit

Delete symbol from current scope. Note: We require that this does not happen after the first time someone does a findMember on a subclass.

Delete symbol from current scope. Note: We require that this does not happen after the first time someone does a findMember on a subclass.

override final def derivesFrom ( base: Symbol ) ( implicit ctx: Context ) : Boolean

Is this a subclass of base, and is the denoting symbol also different from Null or Nothing?

Is this a subclass of base, and is the denoting symbol also different from Null or Nothing?

def ensureFreshScopeAfter ( phase: DenotTransformer ) ( implicit ctx: Context ) : Unit

If this class has the same decls scope reference in phase and phase.next, install a new denotation with a cloned scope in phase.next.

If this class has the same decls scope reference in phase and phase.next, install a new denotation with a cloned scope in phase.next.

def ensureTypeParamsInCorrectOrder ( ) ( implicit ctx: Context ) : Unit

Make sure the type parameters of this class appear in the order given by typeParams in the scope of the class. Reorder definitions in scope if necessar...

Make sure the type parameters of this class appear in the order given by typeParams in the scope of the class. Reorder definitions in scope if necessary.

[+] def enter ( sym: Symbol , scope: Scope ) ( implicit ctx: Context ) : Unit

Enter a symbol in current scope, and future scopes of same denotation. Note: We require that this does not happen after the first time someone does a fi...

Enter a symbol in current scope, and future scopes of same denotation. Note: We require that this does not happen after the first time someone does a findMember on a subclass.

[+] def enter$default$2 : EmptyScope$

Enter a symbol in current scope, and future scopes of same denotation. Note: We require that this does not happen after the first time someone does a fi...

Enter a symbol in current scope, and future scopes of same denotation. Note: We require that this does not happen after the first time someone does a findMember on a subclass.

def enterNoReplace ( sym: Symbol , scope: MutableScope ) ( implicit ctx: Context ) : Unit

Enter a symbol in given scope without potentially replacing the old copy.

Enter a symbol in given scope without potentially replacing the old copy.

[+] override final def findMember ( name: Name , pre: Type , excluded: FlagSet ) ( implicit ctx: Context ) : Denotation

Find member of this denotation with given name and produce a denotation that contains the type of the member as seen from given prefix pre. Exclude all...

Find member of this denotation with given name and produce a denotation that contains the type of the member as seen from given prefix pre. Exclude all members that have flags in excluded from consideration.

private def firstRunId_= ( x$1: RunId ) : Unit
override def fullName ( implicit ctx: Context ) : Name

fullName where `.' is the separator character

fullName where `.' is the separator character

[+] override final def fullNameSeparated ( separator: String ) ( implicit ctx: Context ) : Name

The encoded full path name of this denotation, where outer names and inner names are separated by separator strings. Never translates expansions of oper...

The encoded full path name of this denotation, where outer names and inner names are separated by separator strings. Never translates expansions of operators back to operator symbol. Drops package objects. Represents terms in the owner chain by a simple ~. (Note: scalac uses nothing to represent terms, which can cause name clashes between same-named definitions in different enclosing methods. Before this commit we used `$' but this can cause ambiguities with the class separator '$'). A separator "" means "flat name"; the real separator in this case is "$" and enclosing packages do not form part of the name.

protected override final def info_= ( tp: Type ) : Unit
override def invalidateInheritedInfo ( ) : Unit

Invalidate all caches and fields that depend on base classes and their contents

Invalidate all caches and fields that depend on base classes and their contents

[+] private def isFullyCompleted ( implicit ctx: Context ) : Boolean

The denotation is fully completed: all attributes are fully defined. ClassDenotations compiled from source are first completed, then fully completed. Pa...

The denotation is fully completed: all attributes are fully defined. ClassDenotations compiled from source are first completed, then fully completed. Packages are never fully completed since members can be added at any time.

override final def isSubClass ( base: Symbol ) ( implicit ctx: Context ) : Boolean

Is this a subclass of the given class base?

Is this a subclass of the given class base?

private def memberCache ( implicit ctx: Context ) : LRUCache [ Name, PreDenotation ]
[+] def memberFingerPrint ( implicit ctx: Context ) : FingerPrint

A bloom filter for the names of all members in this class. Makes sense only for parent classes, and should definitely not be used for package classes be...

A bloom filter for the names of all members in this class. Makes sense only for parent classes, and should definitely not be used for package classes because cache never gets invalidated.

def memberNames ( keepOnly: NameFilter ) ( implicit ctx: Context ) : Set [ Name ]
final def membersNamed ( name: Name ) ( implicit ctx: Context ) : PreDenotation

All members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

All members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

final def nonPrivateMembersNamed ( name: Name , inherited: Boolean ) ( implicit ctx: Context ) : PreDenotation

All non-private members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

All non-private members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

def nonPrivateMembersNamed$default$2 : Boolean

All non-private members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

All non-private members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

def paramAccessors ( implicit ctx: Context ) : List [ Symbol ]

The parameter accessors of this class. Term and type accessors, getters and setters are all returned int his list

The parameter accessors of this class. Term and type accessors, getters and setters are all returned int his list

override def primaryConstructor ( implicit ctx: Context ) : Symbol

The primary constructor of a class or trait, NoSymbol if not applicable.

The primary constructor of a class or trait, NoSymbol if not applicable.

def replace ( prev: Symbol , replacement: Symbol ) ( implicit ctx: Context ) : Unit

Replace symbol prev (if defined in current class) by symbol replacement. If prev is not defined in current class, do nothing.

Replace symbol prev (if defined in current class) by symbol replacement. If prev is not defined in current class, do nothing.

def superClass ( implicit ctx: Context ) : Symbol

The symbol of the superclass, NoSymbol if no superclass exists

The symbol of the superclass, NoSymbol if no superclass exists

private def superClassBits ( implicit ctx: Context ) : BitSet

A bitset that contains the superId's of all base classes

A bitset that contains the superId's of all base classes

override def syncWithParents ( implicit ctx: Context ) : SingleDenotation

invalidate caches influenced by parent classes if one of the parents is younger than the denotation itself.

invalidate caches influenced by parent classes if one of the parents is younger than the denotation itself.

[+] override def thisType ( implicit ctx: Context ) : Type

The this-type depends on the kind of class: - for a package class p: ThisType(TypeRef(Noprefix, p)) - for a module class m: A term ref to m's source mo...

The this-type depends on the kind of class: - for a package class p: ThisType(TypeRef(Noprefix, p)) - for a module class m: A term ref to m's source module. - for all other classes c with owner o: ThisType(TypeRef(o.thisType, c))

override final def typeParamCreationFlags : FlagSet

The flags to be used for a type parameter owned by this symbol. Overridden by ClassDenotation.

The flags to be used for a type parameter owned by this symbol. Overridden by ClassDenotation.

override final def typeParams ( implicit ctx: Context ) : List [ TypeSymbol ]

The type parameters of this class

The type parameters of this class

[+] private def typeParamsFromDecls ( implicit ctx: Context ) : List [ TypeSymbol ]

The type parameters in this class, in the order they appear in the current scope decls. This might be temporarily the incorrect order when reading Scala...

The type parameters in this class, in the order they appear in the current scope decls. This might be temporarily the incorrect order when reading Scala2 pickled info. The problem is fixed by ensureTypeParamsInCorrectOrder, which is called once an unpickled symbol has been completed.

override def typeRef ( implicit ctx: Context ) : TypeRef

The TypeRef representing this type denotation at its original location.

The TypeRef representing this type denotation at its original location.