Denotation
A denotation is the result of resolving a name (either simple identifier or select) during a given period.
Denotations can be combined with &
and |
.
& is conjunction, | is disjunction.
&
will create an overloaded denotation from two
non-overloaded denotations if their signatures differ.
Analogously |
of two denotations with different signatures will give
an empty denotation NoDenotation
.
A denotation might refer to NoSymbol
. This is the case if the denotation
was produced from a disjunction of two denotations with different symbols
and there was no common symbol in a superclass that could substitute for
both symbols. Here is an example:
Say, we have:
class A { def f: A } class B { def f: B } val x: A | B = if (test) new A else new B val y = x.f
Then the denotation of y
is SingleDenotation(NoSymbol, A | B)
.
- Value parameters:
- symbol
The referencing symbol, or NoSymbol is none exists
Type members
Types
Value members
Abstract methods
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.
The alternatives of this denotation that satisfy the predicate p
.
The alternatives of this denotation that satisfy the predicate p
.
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
.
- Value parameters:
- relaxed
When true, consider only parameter signatures for a match.
The variant of this denotation that's current in the given context. If no such denotation exists, returns the denotation with each alternative at its first point of definition.
The variant of this denotation that's current in the given context. If no such denotation exists, returns the denotation with each alternative at its first point of definition.
Does this denotation have an alternative that satisfies the predicate p
?
Does this denotation have an alternative that satisfies the predicate p
?
Denotation points to unique symbol; false for overloaded denotations and JointRef denotations.
Denotation points to unique symbol; false for overloaded denotations and JointRef denotations.
The type info, or, if this is a SymDenotation where the symbol is not yet completed, the completer
The type info, or, if this is a SymDenotation where the symbol is not yet completed, the completer
A denotation with the info of this denotation transformed using f
A denotation with the info of this denotation transformed using f
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.
- Throws:
- TypeError
if there is at more than one alternative that satisfies
p
.
Concrete methods
The set of alternative single-denotations making up this denotation
The set of alternative single-denotations making up this denotation
If this is a SingleDenotation, return it, otherwise throw a TypeError
If this is a SingleDenotation, return it, otherwise throw a TypeError
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).
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).
Is this denotation different from NoDenotation or an ErrorDenotation?
Is this denotation different from NoDenotation or an ErrorDenotation?
Find member of this denotation with given name
, all required
flags and no excluded
flag, 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
, all required
flags and no excluded
flag, and produce a denotation that contains the type of the member
as seen from given prefix pre
.
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. The info is an instance of TypeType iff this is a type denotation Uncompleted denotations set myInfo to a LazyType.
The alternative of this denotation that has a type matching targetType
when seen
as a member of type site
and that has a target name matching targetName
, or
NoDenotation
if none exists.
The alternative of this denotation that has a type matching targetType
when seen
as a member of type site
and that has a target name matching targetName
, or
NoDenotation
if none exists.
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 by following this sequence of steps:
- If exactly one the denotations has an inaccessible symbol, pick the other one.
- Otherwise, if one of the infos overrides the other one, and the associated symbol does not score strictly lower than the other one, pick the associated denotation.
- Otherwise, if the two infos can be combined with
infoMeet
, pick that as result info, and pick the symbol that scores higher as result symbol, or picksym1
as a tie breaker. The picked info and symbol are combined in a JointDenotation. - Otherwise, if one of the two symbols scores strongly higher than the other one, pick the associated denotation.
- Otherwise return a multi-denotation consisting of both denotations.
Symbol scoring is determined according to the following ranking where earlier criteria trump later ones. Cases marked with (*) give a strong score advantage, the others a weak one.
- The symbol exists, and the other one does not. (*)
- The symbol is not a bridge, but the other one is. (*)
- The symbol is concrete, and the other one is deferred
- The symbol appears before the other in the linearization of
pre
- The symbol's visibility is strictly greater than the other one's.
- The symbol is a method, but the other one is not.
If this denotation does not exist, fallback to alternative
If this denotation does not exist, fallback to alternative
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.
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.
Inherited methods
Map f
over all single denotations and aggregate the results with g
.
Map f
over all single denotations and aggregate the results with g
.
- Inherited from:
- PreDenotation
The denotation with info(s) as seen from prefix type
The denotation with info(s) as seen from prefix type
- Inherited from:
- PreDenotation
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
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
.
- Inherited from:
- PreDenotation
Keep only those denotations in this group that have all of the flags in required
,
but none of the flags in excluded
.
Keep only those denotations in this group that have all of the flags in required
,
but none of the flags in excluded
.
- Inherited from:
- PreDenotation
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
- M is not marked Private
- If M has a unique symbol, it does not appear in
prevDenots
. - M's signature as seen from prefix
pre
does not appear inownDenots
Return the denotation as seen frompre
. 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.
- Inherited from:
- PreDenotation
Group contains a denotation with the same signature as other
Group contains a denotation with the same signature as other
- Inherited from:
- PreDenotation
The string representation of this showable element.
The string representation of this showable element.
- Inherited from:
- Showable
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
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