abstract class Namer extends Analyzer.MethodSynth with Analyzer.NamerContextErrors
- Alphabetic
- By Inheritance
- Namer
- NamerContextErrors
- MethodSynth
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Namer(context: Analyzer.Context)
Type Members
-
sealed
trait
AnyBeanGetter
extends Namers.Namer.BeanAccessor with Namers.Namer.DerivedGetter
- Definition Classes
- MethodSynth
-
sealed abstract
class
BaseGetter
extends Namers.Namer.DerivedGetter
- Definition Classes
- MethodSynth
-
sealed abstract
class
BeanAccessor
extends Namers.Namer.DerivedFromValDef
- Definition Classes
- MethodSynth
-
case class
BeanGetter
(tree: Global.ValDef) extends Namers.Namer.BeanAccessor with Namers.Namer.AnyBeanGetter with Product with Serializable
- Definition Classes
- MethodSynth
-
case class
BeanSetter
(tree: Global.ValDef) extends Namers.Namer.BeanAccessor with Namers.Namer.DerivedSetter with Product with Serializable
- Definition Classes
- MethodSynth
-
case class
BooleanBeanGetter
(tree: Global.ValDef) extends Namers.Namer.BeanAccessor with Namers.Namer.AnyBeanGetter with Product with Serializable
- Definition Classes
- MethodSynth
-
sealed
trait
Derived
extends AnyRef
This trait assembles what's needed for synthesizing derived methods.
This trait assembles what's needed for synthesizing derived methods. Important: Typically, instances of this trait are created TWICE for each derived symbol; once form Namers in an enter method, and once from Typers in addDerivedTrees. So it's important that creating an instance of Derived does not have a side effect, or if it has a side effect, control that it is done only once.
- Definition Classes
- MethodSynth
-
sealed
trait
DerivedFromClassDef
extends Namers.Namer.DerivedFromMemberDef
- Definition Classes
- MethodSynth
-
sealed
trait
DerivedFromMemberDef
extends Namers.Namer.Derived
- Definition Classes
- MethodSynth
-
sealed
trait
DerivedFromValDef
extends Namers.Namer.DerivedFromMemberDef
- Definition Classes
- MethodSynth
-
sealed
trait
DerivedGetter
extends Namers.Namer.DerivedFromValDef
- Definition Classes
- MethodSynth
-
sealed
trait
DerivedSetter
extends Namers.Namer.DerivedFromValDef
- Definition Classes
- MethodSynth
-
case class
Field
(tree: Global.ValDef) extends Namers.Namer.DerivedFromValDef with Product with Serializable
- Definition Classes
- MethodSynth
-
case class
Getter
(tree: Global.ValDef) extends Namers.Namer.BaseGetter with Product with Serializable
- Definition Classes
- MethodSynth
-
case class
ImplicitClassWrapper
(tree: Global.ClassDef) extends Namers.Namer.DerivedFromClassDef with Product with Serializable
A synthetic method which performs the implicit conversion implied by the declaration of an implicit class.
A synthetic method which performs the implicit conversion implied by the declaration of an implicit class.
- Definition Classes
- MethodSynth
-
case class
LazyValGetter
(tree: Global.ValDef) extends Namers.Namer.BaseGetter with Product with Serializable
Implements lazy value accessors:
Implements lazy value accessors:
- for lazy values of type Unit and all lazy fields inside traits, the rhs is the initializer itself, because we'll just "compute" the result on every access ("computing" unit / constant type is free -- the side-effect is still only run once, using the init bitmap)
- for all other lazy values z the accessor is a block of this form: { z = <rhs>; z } where z can be an identifier or a field.
- Definition Classes
- MethodSynth
-
trait
NoSymbolBeanGetter
extends Namers.Namer.BeanAccessor with Namers.Namer.AnyBeanGetter
- Definition Classes
- MethodSynth
-
case class
Param
(tree: Global.ValDef) extends Namers.Namer.DerivedFromValDef with Product with Serializable
- Definition Classes
- MethodSynth
-
case class
Setter
(tree: Global.ValDef) extends Namers.Namer.DerivedSetter with Product with Serializable
- Definition Classes
- MethodSynth
- class LogTransitions [S] extends AnyRef
Value Members
-
object
NamerErrorGen
- Definition Classes
- NamerContextErrors
-
object
Field
extends Serializable
- Definition Classes
- MethodSynth
-
final
def
!=(arg0: Any): Boolean
Test two objects for inequality.
Test two objects for inequality.
- returns
true
if !(this == that), false otherwise.
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
Equivalent to
x.hashCode
except for boxed numeric types andnull
.Equivalent to
x.hashCode
except for boxed numeric types andnull
. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. Fornull
returns a hashcode wherenull.hashCode
throws aNullPointerException
.- returns
a hash value consistent with ==
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from Analyzer.Namer to any2stringadd[Analyzer.Namer] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (Analyzer.Namer, B)
- Implicit
- This member is added by an implicit conversion from Analyzer.Namer to ArrowAssoc[Analyzer.Namer] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
The expression
x == that
is equivalent toif (x eq null) that eq null else x.equals(that)
.The expression
x == that
is equivalent toif (x eq null) that eq null else x.equals(that)
.- returns
true
if the receiver object is equivalent to the argument;false
otherwise.
- Definition Classes
- AnyRef → Any
- def accessorTypeCompleter(tree: Global.ValDef, isSetter: Boolean): Analyzer.TypeCompleter with Analyzer.LockingTypeCompleter with Global.FlagAgnosticCompleter
-
def
addApplyUnapply(cdef: Global.ClassDef, namer: Analyzer.Namer): Unit
Given a case class case class C[Ts] (ps: Us) Add the following methods to toScope:
Given a case class case class C[Ts] (ps: Us) Add the following methods to toScope:
- if case class is not abstract, add <synthetic> <case> def apply[Ts](ps: Us): C[Ts] = new C[Ts](ps) 2. add a method <synthetic> <case> def unapply[Ts](x: C[Ts]) = <ret-val> where <ret-val> is the caseClassUnapplyReturnValue of class C (see UnApplies.scala)
- cdef
is the class definition of the case class
- namer
is the namer of the module class (the comp. obj)
- def addCopyMethod(cdef: Global.ClassDef, namer: Analyzer.Namer): Unit
-
def
addDerivedTrees(typer: Analyzer.Typer, stat: Global.Tree): List[Global.Tree]
- Definition Classes
- MethodSynth
- def applicableTypeParams(owner: Global.Symbol): List[Global.Symbol]
-
final
def
asInstanceOf[T0]: T0
Cast the receiver object to be of type
T0
.Cast the receiver object to be of type
T0
.Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression
1.asInstanceOf[String]
will throw aClassCastException
at runtime, while the expressionList(1).asInstanceOf[List[String]]
will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.- returns
the receiver object.
- Definition Classes
- Any
- Exceptions thrown
ClassCastException
if the receiver object is not an instance of the erasure of typeT0
.
- def assignAndEnterFinishedSymbol(tree: Global.MemberDef): Global.Symbol
- def assignAndEnterSymbol(tree: Global.MemberDef): Global.Symbol
- def assignSymbol(tree: Global.MemberDef, name: Global.Name, mask: Long): Global.Symbol
-
def
assignSymbol(tree: Global.Tree): Global.Symbol
Creates a new symbol and assigns it to the tree, returning the symbol
-
def
beanAccessors(vd: Global.ValDef): List[DerivedFromValDef]
- Definition Classes
- MethodSynth
-
def
clone(): AnyRef
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the
clone
method is platform dependent.- returns
a copy of the receiver object.
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- Note
not specified by SLS as a member of AnyRef
- def completerOf(tree: Global.Tree): Analyzer.TypeCompleter
-
def
conflict(newS: Global.Symbol, oldS: Global.Symbol): Boolean
- Attributes
- protected
- val context: Analyzer.Context
- def contextFile: AbstractFile
- def createFieldSymbol(tree: Global.ValDef): Global.TermSymbol
- def createImportSymbol(tree: Global.Tree): Global.TermSymbol
- def createInnerNamer(): Analyzer.Namer
-
def
createMemberSymbol(tree: Global.MemberDef, name: Global.Name, mask: Long): Global.Symbol
Create a new symbol at the context owner based on the given tree.
Create a new symbol at the context owner based on the given tree. A different name can be given. If the modifier flags should not be be transferred to the symbol as they are, supply a mask containing the flags to keep.
- def createNamer(tree: Global.Tree): Analyzer.Namer
-
def
createPackageSymbol(pos: Global.Position, pid: Global.RefTree): Global.Symbol
All PackageClassInfoTypes come from here.
- def createPrimaryConstructorParameterNamer: Analyzer.Namer
- def deriveAccessors(vd: Global.ValDef): Boolean
- def enclosingNamerWithScope(scope: Global.Scope): Analyzer.Namer
-
def
ensureCompanionObject(cdef: Global.ClassDef, creator: (Global.ClassDef) ⇒ Global.Tree = companionModuleDef(_)): Global.Symbol
If no companion object for clazz exists yet, create one by applying
creator
to class definition tree.If no companion object for clazz exists yet, create one by applying
creator
to class definition tree.- returns
the companion object symbol.
-
def
ensuring(cond: (Analyzer.Namer) ⇒ Boolean, msg: ⇒ Any): Analyzer.Namer
- Implicit
- This member is added by an implicit conversion from Analyzer.Namer to Ensuring[Analyzer.Namer] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (Analyzer.Namer) ⇒ Boolean): Analyzer.Namer
- Implicit
- This member is added by an implicit conversion from Analyzer.Namer to Ensuring[Analyzer.Namer] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): Analyzer.Namer
- Implicit
- This member is added by an implicit conversion from Analyzer.Namer to Ensuring[Analyzer.Namer] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): Analyzer.Namer
- Implicit
- This member is added by an implicit conversion from Analyzer.Namer to Ensuring[Analyzer.Namer] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
enterBeans(tree: Global.ValDef): Unit
- Attributes
- protected
- Definition Classes
- MethodSynth
- def enterClassDef(tree: Global.ClassDef): Unit
- def enterClassSymbol(tree: Global.ClassDef): Global.Symbol
- def enterCopyMethod(copyDef: Global.DefDef): Global.Symbol
- def enterDefDef(tree: Global.DefDef): Unit
- def enterExistingSym(sym: Global.Symbol, tree: Global.Tree): Analyzer.Context
-
def
enterGetterSetter(tree: Global.ValDef): Unit
- Definition Classes
- MethodSynth
- def enterIfNotThere(sym: Global.Symbol): Unit
-
def
enterImplicitWrapper(tree: Global.ClassDef): Unit
- Definition Classes
- MethodSynth
-
def
enterInScope(sym: Global.Symbol, scope: Global.Scope): Global.Symbol
Enter symbol into given scope and return symbol itself
-
def
enterInScope(sym: Global.Symbol): Global.Symbol
Enter symbol into context's scope and return symbol itself
- def enterLazyVal(tree: Global.ValDef, lazyAccessor: Global.Symbol): Global.TermSymbol
- def enterModuleDef(tree: Global.ModuleDef): Global.Symbol
-
def
enterModuleSymbol(tree: Global.ModuleDef): Global.Symbol
Enter a module symbol.
- def enterPackage(tree: Global.PackageDef): Unit
- def enterSelf(self: Global.ValDef): Unit
- def enterStrictVal(tree: Global.ValDef): Global.TermSymbol
- def enterSym(tree: Global.Tree): Analyzer.Context
- def enterSyms(trees: List[Global.Tree]): Analyzer.Namer
- def enterSyntheticSym(tree: Global.Tree): Global.Symbol
- def enterTypeDef(tree: Global.TypeDef): Global.Symbol
- def enterValDef(tree: Global.ValDef): Unit
- def enterValSymbol(tree: Global.ValDef, sym: Global.TermSymbol): Global.TermSymbol
- def enterValueParams(vparamss: List[List[Global.ValDef]]): List[List[Global.Symbol]]
-
final
def
eq(arg0: AnyRef): Boolean
Tests whether the argument (
that
) is a reference to the receiver object (this
).Tests whether the argument (
that
) is a reference to the receiver object (this
).The
eq
method implements an equivalence relation on non-null instances ofAnyRef
, and has three additional properties:- It is consistent: for any non-null instances
x
andy
of typeAnyRef
, multiple invocations ofx.eq(y)
consistently returnstrue
or consistently returnsfalse
. - For any non-null instance
x
of typeAnyRef
,x.eq(null)
andnull.eq(x)
returnsfalse
. null.eq(null)
returnstrue
.
When overriding the
equals
orhashCode
methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).- returns
true
if the argument is a reference to the receiver object;false
otherwise.
- Definition Classes
- AnyRef
- It is consistent: for any non-null instances
-
def
equals(arg0: Any): Boolean
The equality method for reference types.
-
def
field(vd: Global.ValDef): List[Field]
- Definition Classes
- MethodSynth
-
def
finalize(): Unit
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the
finalize
method is invoked, as well as the interaction betweenfinalize
and non-local returns and exceptions, are all platform dependent.- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- Note
not specified by SLS as a member of AnyRef
- def findCyclicalLowerBound(tp: Global.Type): Global.Symbol
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Analyzer.Namer to StringFormat[Analyzer.Namer] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
Returns the runtime class representation of the object.
Returns the runtime class representation of the object.
- returns
a class object corresponding to the runtime type of the receiver.
- Definition Classes
- AnyRef → Any
-
def
handleSyntheticNameConflict(sym1: Global.Symbol, sym2: Global.Symbol): Unit
Logic to handle name conflicts of synthetically generated symbols We handle right now: t6227
-
def
hashCode(): Int
The hashCode method for reference types.
- def inConstructorFlag: Long
- def includeParent(tpe: Global.Type, parent: Global.Symbol): Global.Type
-
def
isEnumConstant(vd: Global.ValDef): Boolean
Determines whether this field holds an enum constant.
Determines whether this field holds an enum constant. To qualify, the following conditions must be met:
- The field's class has the ENUM flag set
- The field's class extends java.lang.Enum
- The field has the ENUM flag set
- The field is static
- The field is stable
-
final
def
isInstanceOf[T0]: Boolean
Test whether the dynamic type of the receiver object is
T0
.Test whether the dynamic type of the receiver object is
T0
.Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression
1.isInstanceOf[String]
will returnfalse
, while the expressionList(1).isInstanceOf[List[String]]
will returntrue
. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.- returns
true
if the receiver object is an instance of erasure of typeT0
;false
otherwise.
- Definition Classes
- Any
- def moduleClassFlags(moduleFlags: Long): Long
- def moduleClassTypeCompleter(tree: Global.ModuleDef): Analyzer.TypeCompleter with Analyzer.LockingTypeCompleter with Global.FlagAgnosticCompleter
- def monoTypeCompleter(tree: Global.Tree): Analyzer.TypeCompleter with Analyzer.LockingTypeCompleter with Global.FlagAgnosticCompleter
- def namerOf(sym: Global.Symbol): Analyzer.Namer
-
final
def
ne(arg0: AnyRef): Boolean
Equivalent to
!(this eq that)
.Equivalent to
!(this eq that)
.- returns
true
if the argument is not a reference to the receiver object;false
otherwise.
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
- Definition Classes
- AnyRef
- Note
not specified by SLS as a member of AnyRef
-
final
def
notifyAll(): Unit
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
- Definition Classes
- AnyRef
- Note
not specified by SLS as a member of AnyRef
-
def
owner: Global.Symbol
- Attributes
- protected
- def saveDefaultGetter(meth: Global.Symbol, default: Global.Symbol): Unit
- def selfTypeCompleter(tree: Global.Tree): Analyzer.TypeCompleter with Analyzer.LockingTypeCompleter with Global.FlagAgnosticCompleter
- def setPrivateWithin(tree: Global.MemberDef, sym: Global.Symbol): Global.Symbol
- def setPrivateWithin[T <: Global.Symbol](tree: Global.Tree, sym: T, mods: Global.Modifiers): T
-
def
standardAccessors(vd: Global.ValDef): List[DerivedFromValDef]
- Definition Classes
- MethodSynth
-
def
standardEnsureCompanionObject(cdef: Global.ClassDef, creator: (Global.ClassDef) ⇒ Global.Tree = companionModuleDef(_)): Global.Symbol
Default implementation of
ensureCompanionObject
.Default implementation of
ensureCompanionObject
. Can be overridden by analyzer plugins (see AnalyzerPlugins.pluginsEnsureCompanionObject for more details) -
def
standardEnterSym(tree: Global.Tree): Analyzer.Context
Default implementation of
enterSym
.Default implementation of
enterSym
. Can be overridden by analyzer plugins (see AnalyzerPlugins.pluginsEnterSym for more details) -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
- returns
a String representation of the object.
- Definition Classes
- AnyRef → Any
- def typeErrorHandler[T](tree: Global.Tree, alt: T): PartialFunction[Throwable, T]
-
def
typeSig(tree: Global.Tree): Global.Type
TypeSig is invoked by monoTypeCompleters.
TypeSig is invoked by monoTypeCompleters. It returns the type of a definition which is then assigned to the corresponding symbol (typeSig itself does not need to assign the type to the symbol, but it can if necessary).
- val typer: Analyzer.Typer
- def updatePosFlags(sym: Global.Symbol, pos: Global.Position, flags: Long): Global.Symbol
-
def
validate(sym: Global.Symbol): Unit
Check that symbol's definition is well-formed.
Check that symbol's definition is well-formed. This means:
- no conflicting modifiers
abstract
modifier only for classesoverride
modifier never for classesdef
modifier never for parameters of case classes- declarations only in mixins or abstract classes (when not @native)
-
def
validateCompanionDefs(tree: Global.ImplDef): Unit
Given a ClassDef or ModuleDef, verifies there isn't a companion which has been defined in a separate file.
-
def
validateParam(tree: Global.ValDef): Unit
- Definition Classes
- MethodSynth
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (Analyzer.Namer, B)
- Implicit
- This member is added by an implicit conversion from Analyzer.Namer to ArrowAssoc[Analyzer.Namer] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
The Scala compiler API.
The following resources are useful for Scala plugin/compiler development: