The class or term up to which this symbol is accessible, or RootClass if it is public.
The class or term up to which this symbol is accessible, or RootClass if it is public.
The symbol accessed by this accessor function, but with given owner type
The symbol accessed by this accessor function, but with given owner type
The symbol accessed by this accessor (getter or setter) function.
The symbol accessed by this accessor (getter or setter) function.
Accurate string representation of symbols' kind, suitable for developers.
Accurate string representation of symbols' kind, suitable for developers.
For a paramaccessor: a superclass paramaccessor for which this symbol is an alias, NoSymbol for all others
For a paramaccessor: a superclass paramaccessor for which this symbol is an alias, NoSymbol for all others
Returns all symbols overriden by this symbol
Returns all symbols overriden by this symbol
All directly or indirectly inherited classes.
All directly or indirectly inherited classes.
After the typer phase (before, look at the definition's Modifiers), contains the annotations attached to member a definition (class, method, type, field).
After the typer phase (before, look at the definition's Modifiers), contains the annotations attached to member a definition (class, method, type, field).
Return every accessor of a primary constructor parameter in this case class.
Return every accessor of a primary constructor parameter in this case class. The scope declarations may be out of order because fields with less than private access are first given a regular getter, then a new renamed getter which comes later in the declaration list. For this reason we have to pinpoint the right accessors by starting with the original fields (which will be in the right order) and looking for getters with applicable names. The getters may have the standard name "foo" or may have been renamed to "foo$\d+" in SyntheticMethods. See ticket #1373.
The case module corresponding to this case class
The case module corresponding to this case class
If this is a sealed class, its known direct subclasses.
If this is a sealed class, its known direct subclasses. Otherwise Set.empty
The least proper supertype of a class; includes all parent types and refinement where needed.
The least proper supertype of a class; includes all parent types and refinement where needed. You need to compute that in a situation like this: { class C extends P { ... } new C }
A clone of this symbol, but with given owner
A clone of this symbol, but with given owner
A clone of this symbol
A clone of this symbol
Internal method to clone a symbol's implementation without flags or type
Internal method to clone a symbol's implementation without flags or type
For a module or case factory: the class with the same name in the same package.
For a module or case factory: the class with the same name in the same package. For all others: NoSymbol Note: does not work for classes owned by methods, see Namers.companionClassOf
object Foo . companionClass --> class Foo
For a class: the module or case class factory with the same name in the same package.
For a class: the module or case class factory with the same name in the same package. For all others: NoSymbol Note: does not work for modules owned by methods, see Namers.companionModuleOf
class Foo . companionModule --> object Foo
For a module: its linked class For a plain class: its linked module or case factory.
For a module: its linked class For a plain class: its linked module or case factory. Note: does not work for modules owned by methods, see Namers.companionSymbolOf
class Foo <-- companionSymbol --> object Foo
Modify term symbol's type so that a raw type C is converted to an existential C[_]
Modify term symbol's type so that a raw type C is converted to an existential C[_]
This is done in checkAccessible and overriding checks in refchecks We can't do this on class loading because it would result in infinite cycles.
If this symbol is a type parameter skolem (not an existential skolem!) its corresponding type parameter, otherwise this
If this symbol is a type parameter skolem (not an existential skolem!) its corresponding type parameter, otherwise this
String representation of symbol's definition
String representation of symbol's definition
* example: public class Test3<T> {} public class Test1<T extends Test3> {} info for T in Test1 should be >: Nothing <: Test3[_]
* example: public class Test3<T> {} public class Test1<T extends Test3> {} info for T in Test1 should be >: Nothing <: Test3[_]
The package containing this symbol, or NoSymbol if there is not one.
The package containing this symbol, or NoSymbol if there is not one.
The package class containing this symbol, or NoSymbol if there is not one.
The package class containing this symbol, or NoSymbol if there is not one.
If we quantify existentially over this symbol, the bound of the type variable that stands for it pre: symbol is a term, a class, or an abstract type (no alias type allowed)
If we quantify existentially over this symbol, the bound of the type variable that stands for it pre: symbol is a term, a class, or an abstract type (no alias type allowed)
String representation of existentially bound variable
String representation of existentially bound variable
change name by appending $$<fully-qualified-name-of-class base'>
Do the same for any accessed symbols or setters/getters
change name by appending $$<fully-qualified-name-of-class base'>
Do the same for any accessed symbols or setters/getters
Returns all symbols overridden by this symbol, plus all matching symbols defined in parents of the selftype
Returns all symbols overridden by this symbol, plus all matching symbols defined in parents of the selftype
The getter of this value or setter definition in class base', or NoSymbol if
none exists.
The getter of this value or setter definition in class base', or NoSymbol if
none exists.
Does this symbol have an annotation of the given class?
Does this symbol have an annotation of the given class?
If the name of the symbol's owner should be used when you care about seeing an interesting name: in such cases this symbol is e.
If the name of the symbol's owner should be used when you care about seeing an interesting name: in such cases this symbol is e.g. a method parameter with a synthetic name, a constructor named "this", an object "package", etc. The kind string, if non-empty, will be phrased relative to the name of the owner.
same as ownerChain contains sym, but more efficient, and with a twist for refinement classes.
same as ownerChain contains sym, but more efficient, and with a twist for refinement classes. A refinement class has a transowner X if an of its parents has transowner X.
Was symbol's type updated during given phase?
Was symbol's type updated during given phase?
If settings.
If settings.uniqid is set, the symbol's id, else ""
The implementation class of a trait
The implementation class of a trait
Get type info associated with symbol at current phase, after ensuring that symbol is initialized (i.
Get type info associated with symbol at current phase, after ensuring that symbol is initialized (i.e. type is completed).
String representation of symbol's definition following its name
String representation of symbol's definition following its name
Initialize the symbol
Initialize the symbol
Does this symbol denote an auxiliary constructor of its enclosing class?
Does this symbol denote an auxiliary constructor of its enclosing class?
Is this symbol a synthetic apply or unapply method in a companion object of a case class?
Is this symbol a synthetic apply or unapply method in a companion object of a case class?
Is this symbol defined in the same scope and compilation unit as that' symbol?
Is this symbol defined in the same scope and compilation unit as that' symbol?
Is this symbol a constant?
Is this symbol a constant?
Is this symbol effectively final? I.
Is this symbol effectively final? I.e, it cannot be overridden
Is this a symbol which exists only in the implementation class, not in its trait?
Is this a symbol which exists only in the implementation class, not in its trait?
A 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.
A 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.
...
...
Does this symbol denote a wrapper object of the interpreter or its class?
Does this symbol denote a wrapper object of the interpreter or its class?
A total ordering between symbols that refines the class inheritance graph (i.
A total ordering between symbols that refines the class
inheritance graph (i.e. subclass.isLess(superclass) always holds).
the ordering is given by: (_.isType, -_.baseTypeSeq.length) for type symbols, followed by id'.
Is this symbol locally defined? I.
Is this symbol locally defined? I.e. not accessed from outside this' instance
Is this class locally defined? A class is local, if
Is this class locally defined? A class is local, if
Is this symbol a member of class clazz'
Is this symbol a member of class clazz'
Is this symbol a module variable? This used to have to test for MUTABLE to distinguish the overloaded MODULEVAR/SYNTHETICMETH flag, but now SYNTHETICMETH is gone.
Is this symbol a module variable? This used to have to test for MUTABLE to distinguish the overloaded MODULEVAR/SYNTHETICMETH flag, but now SYNTHETICMETH is gone.
Is symbol a monomorphic type? assumption: if a type starts out as monomorphic, it will not acquire type parameters in later phases.
Is symbol a monomorphic type? assumption: if a type starts out as monomorphic, it will not acquire type parameters in later phases.
Is this class nested in another class or module (not a package)?
Is this class nested in another class or module (not a package)?
A partial ordering between symbols.
A partial ordering between symbols. (this isNestedIn that) holds iff this symbol is defined within a class or method defining that symbol
Is this class symbol a subclass of that symbol?
Is this class symbol a subclass of that symbol?
Is this symbol a type but not a class?
Is this symbol a type but not a class?
Is this symbol an accessor method for outer?
Is this symbol an accessor method for outer?
Is this symbol an accessor method for outer?
Is this symbol an accessor method for outer?
Does this symbol denote the primary constructor of its enclosing class?
Does this symbol denote the primary constructor of its enclosing class?
Does this symbol denote a stable value?
Does this symbol denote a stable value?
Is this symbol static (i.
Is this symbol static (i.e. with no outer instance)?
Is this symbol a static constructor?
Is this symbol a static constructor?
Is this symbol a static member of its class? (i.
Is this symbol a static member of its class? (i.e. needs to be implemented as a Java static?)
Does this symbol denote a class that defines static symbols?
Does this symbol denote a class that defines static symbols?
Is this class or type defined as a structural refinement type?
Is this class or type defined as a structural refinement type?
Was symbol's type updated during given phase?
Was symbol's type updated during given phase?
Term symbols with the exception of static parts of Java classes and packages.
Term symbols with the exception of static parts of Java classes and packages.
String representation of symbol's definition key word
String representation of symbol's definition key word
For a lazy value, its lazy accessor.
For a lazy value, its lazy accessor. NoSymbol for all others
If this is a lazy value, the lazy accessor; otherwise this symbol.
If this is a lazy value, the lazy accessor; otherwise this symbol.
For a module class: its linked class For a plain class: the module class of its linked module.
For a module class: its linked class For a plain class: the module class of its linked module.
class Foo <-- linkedClassOfClass --> class Foo$
String representation of location, plus a preposition.
String representation of location, plus a preposition. Doesn't do much, for backward compatibility reasons.
The method or class which logically encloses the current symbol.
The method or class which logically encloses the current symbol. If the symbol is defined in the initialization part of a template this is the template's primary constructor, otherwise it is the physically enclosing method or class.
Example 1:
def f() { val x = { def g() = ...; g() } }
In this case the owner chain of g' is
x', followed by f' and
g.logicallyEnclosingMember == f.
Example 2:
class C {
def <init> = { ... }
val x = { def g() = ...; g() } }
}
In this case the owner chain of
g' is x', followed by
C' but
g.logicallyEnclosingMember is the primary constructor symbol <init>'
(or, for traits:
$init') of C'.
Remove private modifier from symbol sym's definition. If
sym' is a
term symbol rename it by expanding its name to avoid name clashes
Remove private modifier from symbol sym's definition. If
sym' is a
term symbol rename it by expanding its name to avoid name clashes
Adds the interface scala.
Adds the interface scala.Serializable to the parents of a ClassInfoType. Note that the tree also has to be updated accordingly.
The non-private member of site' whose type and name match the type of this symbol
The non-private member of site' whose type and name match the type of this symbol
The non-private symbol whose type matches the type of this symbol in in given class.
The non-private symbol whose type matches the type of this symbol in in given class.
The class containing the symbol's definition
The base type from which member types are computed
The directly or indirectly inherited mixins of this class except for mixin classes inherited by the superclass.
The directly or indirectly inherited mixins of this class except for mixin classes inherited by the superclass. Mixin classes appear in linearization order.
The module class corresponding to this module.
The module class corresponding to this module.
String representation of symbol's simple name.
String representation of symbol's simple name. If !settings.debug translates expansions of operators back to operator symbol. E.g. $eq => =. If settings.uniqid, adds id.
Is this symbol a trait which needs an implementation class?
Is this symbol a trait which needs an implementation class?
Symbol of an abstract type type T >: .
Symbol of an abstract type type T >: ... <: ...
Symbol of a type definition type T = .
Symbol of a type definition type T = ...
Create a new getter for current symbol (which must be a field)
Create a new getter for current symbol (which must be a field)
Create local dummy for template (owner of local blocks)
Create local dummy for template (owner of local blocks)
for explicit outer phase
for explicit outer phase
type relative to which alternatives are seen. for instance: class C[T] { def m(x: T): T def m'(): T } val v: C[Int]
Then v.m has symbol TermSymbol(flags = {OVERLOADED}, tpe = OverloadedType(C[Int], List(m, m'))) You recover the type of m doing a
m.tpe.asSeenFrom(pre, C) (generally, owner of m, which is C here).
or:
pre.memberType(m)
Refinement types P { val x: String; type T <: Number } also have symbols, they are refinementClasses
Refinement types P { val x: String; type T <: Number } also have symbols, they are refinementClasses
Synthetic value parameter when parameter symbol is not available.
Synthetic value parameter when parameter symbol is not available. Calling this method multiple times will re-use the same parameter name.
Synthetic value parameters when parameter symbols are not available.
Synthetic value parameters when parameter symbols are not available. Calling this method multiple times will re-use the same parameter names.
Synthetic value parameters when parameter symbols are not available
Synthetic value parameters when parameter symbols are not available
Symbol of a type parameter
Symbol of a type parameter
Type skolems are type parameters seen from the inside
Assuming a polymorphic method m[T], its type is a PolyType which has a TypeParameter
with name
T' in its typeParams list. While type checking the parameters, result type and
body of the method, there's a local copy of
T' which is a TypeSkolem.
Type skolems are type parameters seen from the inside
Assuming a polymorphic method m[T], its type is a PolyType which has a TypeParameter
with name
T' in its typeParams list. While type checking the parameters, result type and
body of the method, there's a local copy of
T' which is a TypeSkolem.
Return the original enclosing method of this symbol.
Return the original enclosing method of this symbol. It should return the same thing as enclMethod when called before lambda lift, but it preserves the original nesting when called afterwards.
If this symbol has an expanded name, its original name, otherwise its name itself.
If this symbol has an expanded name, its original name, otherwise its name itself.
expandName
The class that is logically an outer class of given clazz'.
This is the enclosing class, except for classes defined locally to constructors,
where it is the outer class of the enclosing class
The class that is logically an outer class of given clazz'.
This is the enclosing class, except for classes defined locally to constructors,
where it is the outer class of the enclosing class
For an outer accessor: The class from which the outer originates.
For an outer accessor: The class from which the outer originates. For all other symbols: NoSymbol
The symbol overridden by this symbol in given class ofclazz'.
The symbol overridden by this symbol in given class ofclazz'.
The symbol overriding this symbol in given subclass ofclazz'
The symbol overriding this symbol in given subclass ofclazz'
String representation of location.
String representation of location.
The value parameter sections of this symbol.
The value parameter sections of this symbol.
The primary constructor of a class
The primary constructor of a class
Conditions where we omit the prefix when printing a symbol, to avoid unpleasantries like Predef.
Conditions where we omit the prefix when printing a symbol, to avoid unpleasantries like Predef.String, $iw.$iw.Foo and <empty>.Bippy.
Return info without checking for initialization or completing
Return info without checking for initialization or completing
Remove all annotations matching the given class.
Remove all annotations matching the given class.
Reset symbol to initial state
Reset symbol to initial state
Recursively finds all sealed descendants and returns a sorted list.
Recursively finds all sealed descendants and returns a sorted list. Includes this symbol unless it is abstract, but as value classes are marked abstract so they can't be instantiated, they are special cased.
The String used to order otherwise identical sealed symbols.
The String used to order otherwise identical sealed symbols. This uses data which is stable across runs and variable classpaths (the initial Name) before falling back on id, which varies depending on exactly when a symbol is loaded.
Set initial info.
Set initial info.
The setter of this value or getter definition, or NoSymbol if none exists
The setter of this value or getter definition, or NoSymbol if none exists
The simple name of this Symbol
The simple name of this Symbol
If this is a constructor, its owner: otherwise this.
If this is a constructor, its owner: otherwise this.
If this is a package object or package object class, its owner: otherwise this.
If this is a package object or package object class, its owner: otherwise this.
The superclass of this class
The superclass of this class
The symbol accessed by a super in the definition of this symbol when
seen from class base'. This symbol is always concrete.
pre:
this.
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'.
A tag which (in the ideal case) uniquely identifies class symbols
A tag which (in the ideal case) uniquely identifies class symbols
A symbol carrying the self type of the class as its type
A symbol carrying the self type of the class as its type
the type this.
the type this.type in this class
If this symbol is an implementation class, its interface, otherwise the symbol itself The method follows two strategies to determine the interface.
If this symbol is an implementation class, its interface, otherwise the symbol itself The method follows two strategies to determine the interface.
String representation, including symbol's kind e.
String representation, including symbol's kind e.g., "class Foo", "method Bar". If hasMeaninglessName is true, uses the owner's name to disambiguate identity.
The top-level class containing this symbol
The top-level class containing this symbol
Let's say you have a type definition
Let's say you have a type definition
type T <: Number
and tsym is the symbol corresponding to T. Then
tsym.info = TypeBounds(Nothing, Number) tsym.tpe = TypeRef(NoPrefix, T, List())
The type constructor of a symbol is: For a type symbol, the type corresponding to the symbol itself, excluding parameters.
The type constructor of a symbol is: For a type symbol, the type corresponding to the symbol itself, excluding parameters. Not applicable for term symbols.
the self type of an object foo is foo.
the self type of an object foo is foo.type, not class<foo>.this.type
Sets the self type of the class
Sets the self type of the class
The type parameters of this symbol.
The type parameters of this symbol. assumption: if a type starts out as monomorphic, it will not acquire type parameters later.
If this symbol is an existential skolem the location (a Tree or null) where it was unpacked.
If this symbol is an existential skolem the location (a Tree or null) where it was unpacked. Resulttype is AnyRef because trees are not visible here.
The type parameters of this symbol, without ensuring type completion.
The type parameters of this symbol, without ensuring type completion. assumption: if a type starts out as monomorphic, it will not acquire type parameters later.
Set new info valid from start of this phase.
Set new info valid from start of this phase.
The variance of this symbol as an integer
The variance of this symbol as an integer
String representation of symbol's variance
String representation of symbol's variance
A class for class symbols