PackageScope

final class PackageScope extends MutableScope

The scope of a package. This is different from a normal scope in that names of scope entries are kept in mangled form.

class Scope
trait Showable
class Object
trait Matchable
class Any

Value members

Concrete methods

override def ensureComplete()(using Context): Unit

Ensure that all elements of this scope have been entered. Overridden by SymbolLoaders.PackageLoader#PackageScope, where it makes sure that all names with $'s have been added.

Ensure that all elements of this scope have been entered. Overridden by SymbolLoaders.PackageLoader#PackageScope, where it makes sure that all names with $'s have been added.

Definition Classes
override def lookupEntry(name: Name)(using Context): ScopeEntry | Null

Lookup a symbol entry matching given name.

Lookup a symbol entry matching given name.

Definition Classes
override def newScopeEntry(name: Name, sym: Symbol)(using Context): ScopeEntry

create and enter a scope entry with given name and symbol

create and enter a scope entry with given name and symbol

Definition Classes
Definition Classes

Inherited methods

override def checkConsistent()(using Context): Unit

Check that all symbols in this scope are in their correct hashtable buckets.

Check that all symbols in this scope are in their correct hashtable buckets.

Definition Classes
Inherited from:
MutableScope

Clone scope, taking care not to force the denotations of any symbols in the scope.

Clone scope, taking care not to force the denotations of any symbols in the scope.

Inherited from:
MutableScope
final def contains(name: Name, sym: Symbol)(using Context): Boolean

Does this scope contain a reference to sym when looking up name?

Does this scope contain a reference to sym when looking up name?

Inherited from:
Scope
final def denotsNamed(name: Name)(using Context): PreDenotation

The denotation set of all the symbols with given name in this scope Symbols occur in the result in reverse order relative to their occurrence in this.toList.

The denotation set of all the symbols with given name in this scope Symbols occur in the result in reverse order relative to their occurrence in this.toList.

Inherited from:
Scope
final def enter[T <: Symbol](name: Name, sym: T)(using Context): T
Inherited from:
MutableScope
final def enter[T <: Symbol](sym: T)(using Context): T

enter a symbol in this scope.

enter a symbol in this scope.

Inherited from:
MutableScope
final def enterUnique(sym: Symbol)(using Context): Unit

enter a symbol, asserting that no symbol with same name exists in scope

enter a symbol, asserting that no symbol with same name exists in scope

Inherited from:
MutableScope
def exists(p: Symbol => Boolean)(using Context): Boolean

Tests whether a predicate holds for at least one Symbol of this Scope.

Tests whether a predicate holds for at least one Symbol of this Scope.

Inherited from:
Scope
def fallbackToText(printer: Printer): Text

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

Inherited from:
Showable
def filter(p: Symbol => Boolean)(using Context): List[Symbol]

Selects all Symbols of this Scope which satisfy a predicate.

Selects all Symbols of this Scope which satisfy a predicate.

Inherited from:
Scope
final def filteredScope(p: Symbol => Boolean)(using Context): Scope

The scope that keeps only those symbols from this scope that match the given predicates. If all symbols match, returns the scope itself, otherwise a copy with the matching symbols.

The scope that keeps only those symbols from this scope that match the given predicates. If all symbols match, returns the scope itself, otherwise a copy with the matching symbols.

Inherited from:
Scope
def find(p: Symbol => Boolean)(using Context): Symbol

Finds the first Symbol of this Scope satisfying a predicate, if any.

Finds the first Symbol of this Scope satisfying a predicate, if any.

Inherited from:
Scope
def foreach[U](f: Symbol => U)(using Context): Unit

Applies a function f to all Symbols of this Scope.

Applies a function f to all Symbols of this Scope.

Inherited from:
Scope
override def implicitDecls(using Context): List[TermRef]
Definition Classes
Inherited from:
MutableScope

Is the scope empty?

Is the scope empty?

Inherited from:
Scope

Return all symbols as an iterator in the order they were entered in this scope.

Return all symbols as an iterator in the order they were entered in this scope.

Inherited from:
Scope
final def lookup(name: Name)(using Context): Symbol

Lookup a symbol

Lookup a symbol

Inherited from:
Scope
final def lookupAll(name: Name)(using Context): Iterator[Symbol]

Returns an iterator yielding every symbol with given name in this scope.

Returns an iterator yielding every symbol with given name in this scope.

Inherited from:
Scope
final override def lookupNextEntry(entry: ScopeEntry)(using Context): ScopeEntry | Null

lookup next entry with same name as this one

lookup next entry with same name as this one

Definition Classes
Inherited from:
MutableScope
Definition Classes
Inherited from:
MutableScope
final def replace(prev: Symbol, replacement: Symbol)(using Context): Unit

Replace symbol prev (if it exists in current scope) by symbol replacement.

Replace symbol prev (if it exists in current scope) by symbol replacement.

Inherited from:
MutableScope
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Inherited from:
Showable
def showIndented(margin: Int)(using Context): String

The string representation with each line after the first one indented by the given given margin (in spaces).

The string representation with each line after the first one indented by the given given margin (in spaces).

Inherited from:
Showable
def showSummary(depth: Int)(using Context): String

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

Inherited from:
Showable
final override def size: Int

The number of symbols in this scope (including inherited ones from outer scopes).

The number of symbols in this scope (including inherited ones from outer scopes).

Definition Classes
Inherited from:
MutableScope
final def sorted(using Context): List[Symbol]

Vanilla scope - symbols are stored in declaration order.

Vanilla scope - symbols are stored in declaration order.

Inherited from:
MutableScope
final override def toList(using Context): List[Symbol]

Returns all symbols as a list in the order they were entered in this scope. Does not include the elements of inherited scopes.

Returns all symbols as a list in the order they were entered in this scope. Does not include the elements of inherited scopes.

Definition Classes
Inherited from:
MutableScope
final def toText(printer: Printer): Text

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

Inherited from:
Scope

Use specified synthesize for this scope

Use specified synthesize for this scope

Inherited from:
MutableScope

Inherited fields

The number of scopes enclosing this scope.

The number of scopes enclosing this scope.

Inherited from:
MutableScope