Form a denotation by conjoining with denotation that
.
Form a denotation by conjoining with denotation that
.
NoDenotations are dropped. MultiDenotations are handled by merging parts with same signatures. SingleDenotations with equal signatures are joined as follows:
In a first step, consider only those denotations which have symbols
that are accessible from prefix pre
.
If there are several such denotations, try to pick one by applying the following three precedence rules in decreasing order of priority:
If there is exactly one (preferred) accessible denotation, return it.
If there is no preferred accessible denotation, return a JointRefDenotation
with one of the operand symbols (unspecified which one), and an info which
is the intersection (using &
or safe_&
if safeIntersection
is true)
of the infos of the operand denotations.
If SingleDenotations with different signatures are joined, return NoDenotation.
The class or term symbol up to which this symbol is accessible, or RootClass if it is public.
The class or term symbol up to which this symbol is accessible, or RootClass if it is public. As java protected statics are otherwise completely inaccessible in scala, they are treated as public.
The access boundary to assume if this symbol is protected
The field accessed by this getter or setter, or if it does not exist, the getter
The denotation made up from the alternatives of this denotation that
are accessible from prefix pre
, or NoDenotation if no accessible alternative exists.
The denotation made up from the alternatives of this denotation that
are accessible from prefix pre
, or NoDenotation if no accessible alternative exists.
Add given annotation to the annotations of this denotation
Add all given annotations to this symbol
All symbols overriden by this denotation.
The set of alternative single-denotations making up this denotation
The set of alternative single-denotations making up this denotation
The alternatives of this denotation that satisfy the predicate p
.
The alternatives of this denotation that satisfy the predicate p
.
The annotations of this denotation
Cast to class denotation
The denotation with info(s) as seen from prefix type
The denotation with info(s) as seen from prefix type
Resolve overloaded denotation to pick the ones with the given signature
when seen from prefix site
.
Resolve overloaded denotation to pick the ones with the given signature
when seen from prefix site
.
When true, consider only parameter signatures for a match.
If false, this symbol cannot possibly participate in an override, either as overrider or overridee.
If this is a SingleDenotation, return it, otherwise throw a TypeError
If this is a SingleDenotation, return it, otherwise throw a TypeError
The class with the same (type-) name as this module or module class, and which is also defined in the same scope and compilation unit.
The class with the same (type-) name as this module or module class, and which is also defined in the same scope and compilation unit. NoSymbol if this class does not exist.
The module object with the same (term-) name as this class or module class, and which is also defined in the same scope and compilation unit.
The module object with the same (term-) name as this class or module class, and which is also defined in the same scope and compilation unit. NoSymbol if this module does not exist.
The completer of this denotation.
The completer of this denotation. @pre: Denotation is not yet completed
Group contains a denotation that refers to given symbol
Group contains a denotation that refers to given symbol
Copy this denotation, overriding selective fields
The period (interval of phases) for which there exists a valid denotation in this flock.
The period (interval of phases) for which there exists a valid denotation in this flock.
The variant of this denotation that's current in the given context.
The variant of this denotation that's current in the given context.
If no such denotation exists: If Mode.FutureDefs is set, the
denotation with each alternative at its first point of definition,
otherwise a NotDefinedHere
exception is thrown.
Produce a denotation that is valid for the given context.
Produce a denotation that is valid for the given context. Usually called when !(validFor contains ctx.period) (even though this is not a precondition). If the runId of the context is the same as runId of this denotation, the right flock member is located, or, if it does not exist yet, created by invoking a transformer (@See Transformers). If the runId's differ, but this denotation is a SymDenotation and its toplevel owner class or module is still a member of its enclosing package, then the whole flock is brought forward to be valid in the new runId. Otherwise the symbol is stale, which constitutes an internal error.
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
?
erroneous classes are assumed to derive from all other classes and all classes derive from them.
If this denotation is overloaded, filter with given predicate.
If this denotation is overloaded, filter with given predicate. If result is still overloaded throw a TypeError. Note: disambiguate is slightly different from suchThat in that single-denotations that do not satisfy the predicate are left alone (whereas suchThat would map them to NoDenotation).
The name, except
The name, except
The owner, skipping package objects, labels and non-lazy valdefs.
The class containing this denotation.
The class containing this denotation.
If this denotation is already a class, return itself
Definitions flagged with InSuperCall are treated specially.
Their enclosing class is not the lexically enclosing class,
but in turn the enclosing class of the latter. This reflects
the context created by Context#superCallContext
, Context#thisCallArgContext
for these definitions.
Note, that as packages have ClassSymbols, top level classes will have an enclosingClass
with Package flag set.
The class containing this denotation which has the given effective name.
The closest enclosing method containing this definition.
The closest enclosing method containing this definition. A local dummy owner is mapped to the primary constructor of the class.
The package class containing this denotation
The class that encloses the owner of the current context and that is a subclass of this class.
The class that encloses the owner of the current context and that is a subclass of this class. NoSymbol if no such class exists.
Make sure this denotation is completed
If denotation is private, remove the Private flag and expand the name if necessary
Is this denotation different from NoDenotation or an ErrorDenotation?
Is this denotation different from NoDenotation or an ErrorDenotation?
The expanded name of this denotation.
Returns all matching symbols defined in parents of the selftype.
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
Keep only those annotations that satisfy p
Keep only those denotations in this group which have a signature
that's not already defined by denots
.
Keep only those denotations in this group which have a signature
that's not already defined by denots
.
Keep only those denotations in this group whose flags do not intersect
with excluded
.
Keep only those denotations in this group whose flags do not intersect
with excluded
.
Keep only those denotations in this group which satisfy predicate p
.
Keep only those denotations in this group which satisfy predicate p
.
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
.
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.
First/last denotation in the group
First/last denotation in the group
The flag set
Update the flag set
The encoded flat name of this denotation, where joined names are separated by separator
characters.
fullName
where .' is the separator character
The encoded full path name of this denotation, where outer names and inner names
are separated by separator
strings.
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.
Optionally, the annotation matching the given class symbol
Does this denotation have an alternative that satisfies the predicate p
?
Does this denotation have an alternative that satisfies the predicate p
?
Does this denotation have an annotation matching the given class symbol?
Does this symbol have defined or inherited default parameters?
The type info.
The type info. The info is an instance of TypeType iff this is a type denotation Uncompleted denotations set myInfo to a LazyType.
The type info, or, if symbol is not yet completed, the completer
The type info, or, if symbol is not yet completed, the completer
The version of this SingleDenotation that was valid in the first phase of this run.
The version of this SingleDenotation that was valid in the first phase of this run.
Install this denotation as the result of the given denotation transformer.
Install this denotation as the result of the given denotation transformer.
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
Has this denotation all of the flags in fs
set, whereas none of the flags
in butNot
are set?
Has this denotation all of the flags in fs
set?
Has this denotation one of the flags in fs
set, whereas none of the flags
in butNot
are set?
Has this denotation one of the flags in fs
set?
Is symbol known to not exist?
Is this symbol an abstract or alias type?
Is this symbol an abstract type?
Is this definition accessible as a member of tree with type pre
?
Is this definition accessible as a member of tree with type pre
?
The type of the tree from which the selection is made
Access is via super
Everything is accessible if pre
is NoPrefix
.
A symbol with type NoType
is not accessible for any other prefix.
Is this symbol an alias type?
Is this symbol an anonymous class?
Is this symbol concrete, or that symbol deferred?
Is this denotation a class?
is this the constructor of a class?
Is this denotation defined in the same scope and compilation unit as that symbol?
Is this a companion class method or companion object method? These methods are generated by Symbols#synthesizeCompanionMethod and used in SymDenotations#companionClass and SymDenotations#companionModule .
The denotation is completed: info is not a lazy type and attributes have defined values
The denotation is in train of being completed
Is this the constructor of a trait or a class
Is this definition contained in boundary
?
Same as ownersIterator contains boundary
but more efficient.
Is this symbol the empty package class or its companion object?
A symbol is effectively final if it cannot be overridden in a subclass
Is this symbol the empty package class or its companion object?
is this symbol the result of an erroneous definition?
Is this a getter?
Is this the constructor of a trait?
is this a symbol representing an import?
A member of class base
is incomplete if
(1) it is declared deferred or
(2) it is abstract override and its super symbol in base
is
nonexistent or incomplete.
Is this a local template dummmy?
Is this symbol a class references to which that are supertypes of null?
Is symbol a primitive numeric value class?
Is this denotation overloaded?
Is this denotation overloaded?
Is this symbol a package object or its module class?
Is symbol a phantom class for which no runtime representation exists?
Does this symbol denote the primary constructor of its enclosing class?
Is symbol a primitive value class?
Is this denotation a non-trait class?
Is this a "real" method? A real method is a method which is:
Is this a "real" method? A real method is a method which is:
Is this symbol a class representing a refinement? These classes are used only temporarily in Typer and Unpickler as an intermediate step for creating Refinement types.
Is this symbol the root class or its companion object?
Is this the denotation of a self symbol of some class? This is the case if one of two conditions holds:
Is this the denotation of a self symbol of some class? This is the case if one of two conditions holds:
Is this a setter?
Is this a denotation of a stable term (or an arbitrary type)?
Is this denotation static (i.e.
Is this denotation static (i.e. with no outer instance)?
Does this symbol denote the static constructor of its enclosing class?
Is this a package class or module class that defines static symbols?
Is this a subclass of the given class base
?
Is this a reference to a term symbol?
Is this a reference to a term symbol?
Is this denotation a type?
Is this denotation a type?
Is this symbol a class that extends AnyVal
?
Is this a syntetic method that represents conversions between representations of a value class These methods are generated in ExtensionMethods and used in ElimErasedValueType.
Symbol is an owner that would be skipped by effectiveOwner.
Symbol is an owner that would be skipped by effectiveOwner. Skipped are
A class that in source code would be lexically enclosing
If this is a class, the module class of its companion object.
If this is a class, the module class of its companion object. If this is a module class, its companion class. NoSymbol otherwise.
A denotation with the info of this denotation transformed using f
A denotation with the info of this denotation transformed using f
Keep only those inherited members M of this predenotation for which the following is true
Keep only those inherited members M of this predenotation for which the following is true
prevDenots
.pre
does not appear in ownDenots
Return the denotation as seen from pre
.
Called from SymDenotations.computeMember. There, ownDenots
are the denotations found in
the base class, which shadow any inherited denotations with the same signature.
prevDenots
are the denotations that are defined in the class or inherited from
a base type which comes earlier in the linearization.
Make denotation not exist
Group contains a denotation with given signature
Group contains a denotation with given signature
The non-private symbol whose name and type matches the type of this symbol in the given class.
The non-private symbol whose name and type matches the type of this symbol in the given class.
The class containing the result symbol's definition
The base type from which member types are computed
inClass <-- find denot.symbol class C { <-- symbol is here
site: Subtype of both inClass and C
The alternative of this denotation that has a type matching targetType
when seen
as a member of type site
, NoDenotation
if none exists.
The alternative of this denotation that has a type matching targetType
when seen
as a member of type site
, NoDenotation
if none exists.
The non-private member of site
whose name and type matches the type of this symbol
Same as owner, except returns NoSymbol for NoSymbol
If false, this class member cannot possibly participate in an override, either as overrider or overridee.
Do members of this symbol need translation via asSeenFrom when
accessed via prefix pre
?
Merge two lists of names.
Merge two lists of names. If names in corresponding positions match, keep them, otherwise generate new synthetic names.
The class implementing this module, NoSymbol if not applicable.
The NamedType representing this denotation at its original location.
The NamedType representing this denotation at its original location.
Same as either typeRef
or termRefWithSig
depending whether this denotes a type or not.
The named type parameters declared or inherited by this symbol
The next SingleDenotation in this run, with wrap-around from last to first.
The next SingleDenotation in this run, with wrap-around from last to first.
There may be several SingleDenotation
s with different validity
representing the same underlying definition at different phases.
These are called a "flock". Flock members are generated by
If this denotation does not exist, fallback to alternative
If this denotation does not exist, fallback to alternative
The name with which the denoting symbol was created
The symbol, in class inClass
, that is overridden by this denotation.
The symbol overriding this symbol in given subclass ofclazz
.
The owner of the symbol; overridden in NoDenotation
The chain of owners of this denotation, starting with the denoting symbol itself
The primary constructor of a class or trait, NoSymbol if not applicable.
The privateWithin boundary, NoSymbol if no boundary is given.
Set privateWithin.
Set privateWithin.
Remove annotation with given class from this denotation
Return symbol in this denotation that satisfies the given predicate.
Return symbol in this denotation that satisfies the given predicate.
if generateStubs is specified, return a stubsymbol if denotation is a missing ref.
Throw a TypeError
if predicate fails to disambiguate symbol or no alternative matches.
Unset given flags(s) of this denotation
Set applicable flags from flags
which is a subset of {NoInits, PureInterface}
Set given flags(s) of this denotation
The string representation of this showable element.
The string representation of this showable element.
Show declaration string; useful for showing declarations as seen from subclasses.
Show declaration string; useful for showing declarations as seen from subclasses.
The summarized string representation of this showable element.
The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.
The signature of the denotation.
The signature of the denotation.
If this is a weak owner, its owner, otherwise the denoting symbol.
The module implemented by this module class, NoSymbol if not applicable.
The unique alternative of this denotation that satisfies the predicate p
,
or NoDenotation if no satisfying alternative exists.
The unique alternative of this denotation that satisfies the predicate p
,
or NoDenotation if no satisfying alternative exists.
TypeError
if there is at more than one alternative that satisfies p
.
The symbol accessed by a super in the definition of this symbol when
seen from class base
.
The symbol accessed by a super in the definition of this symbol when
seen from class base
. This symbol is always concrete.
pre: this.owner
is in the base class sequence of base
.
The referencing symbol, or NoSymbol is none exists
The referencing symbol, or NoSymbol is none exists
For ClassDenotations only: If caches influenced by parent classes are still valid, the denotation itself, otherwise a freshly initialized copy.
For ClassDenotations only: If caches influenced by parent classes are still valid, the denotation itself, otherwise a freshly initialized copy.
The TermRef representing this term denotation at its original location.
The TermRef representing this term denotation at its original location.
The TermRef representing this term denotation at its original location at the denotation's signature.
The TermRef representing this term denotation at its original location at the denotation's signature.
Unlike valRef
and termRef
, this will force the completion of the
denotation via a call to info
.
The type This(cls), where cls is this class, NoPrefix for all other symbols
Convert to full denotation by &-ing all elements
Convert to full denotation by &-ing all elements
The text representation of this showable element.
The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.
The top-level class containing this denotation, except for a toplevel module, where its module class is returned.
Apply a transformation f
to all denotations in this group that start at or after
given phase.
Apply a transformation f
to all denotations in this group that start at or after
given phase. Denotations are replaced while keeping the same validity periods.
Apply transform f
to all annotations of this denotation
The flags to be used for a type parameter owned by this symbol.
The flags to be used for a type parameter owned by this symbol. Overridden by ClassDenotation.
The type parameters of a class symbol, Nil for all other symbols
The TypeRef representing this type denotation at its original location.
The TypeRef representing this type denotation at its original location.
The field accessed by a getter or setter, or if it does not exists, the getter of a setter, or if that does not exist the symbol itself.
The same as getAnnotation, but without ensuring that the symbol carrying the annotation is completed
The symbols defined in this class or object.
The symbols defined in this class or object. Careful! This does not force the type, so is compilation order dependent. This method should be used only in the following circumstances:
Optionally, the info if it is completed
The union of two groups.
The union of two groups.
Throws an UnsupportedOperationException
with the given method name.
Throws an UnsupportedOperationException
with the given method name.
Remove any annotations with same class as annot
, and add annot
The TermRef representing this term denotation at its original location
and at signature NotAMethod
.
The TermRef representing this term denotation at its original location
and at signature NotAMethod
.
The period during which this denotation is valid.
The period during which this denotation is valid.
The variance of this type parameter or type member as an Int, with +1 = Covariant, -1 = Contravariant, 0 = Nonvariant, or not a type parameter
Form a choice between this denotation and that one.
Form a choice between this denotation and that one.
The prefix type of the members of the denotation, used to determine an accessible symbol if it exists.
A sym-denotation represents the contents of a definition during a period.