Scala Compiler2.12.3-1 < Back
 

# Packages

-  package root

  The Scala compiler and reflection APIs.

  The Scala compiler and reflection APIs.

  Definition Classes
    root
-  package scala
  Definition Classes
    root
-  package tools
  Definition Classes
    scala
-  package nsc
  Definition Classes
    tools
-  package typechecker
  Definition Classes
    nsc
-  trait Namers extends MethodSynthesis

  This trait declares methods to create symbols and to enter them into scopes.

  This trait declares methods to create symbols and to enter them into scopes.

  Definition Classes
    typechecker
  Version

    1.0

- ClassMethodSynthesis
- CompleterWrapper
- LockingTypeCompleter
- MethodSynth
- Namer
- PolyTypeCompleter
- TypeCompleter
- TypeCompleterBase

c

scala.tools.nsc.typechecker.Namers

# Namer 

###

#### abstract class Namer extends Analyzer.MethodSynth with Analyzer.NamerContextErrors

Self Type
  Analyzer.Namer
Source
  Namers.scala

Linear Supertypes
Analyzer.NamerContextErrors, Analyzer.MethodSynth, AnyRef, Any
Known Subclasses
InteractiveNamer
Type Hierarchy
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Namer
2. NamerContextErrors
3. MethodSynth
4. AnyRef
5. Any

Implicitly

1. by any2stringadd
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new Namer(context: Analyzer.Context)

### Type Members

1.  trait DerivedAccessor extends AnyRef
   Definition Classes
     MethodSynth
2.  case class Getter (tree: Global.ValDef) extends Namers.Namer.DerivedAccessor with Product with Serializable
   Definition Classes
     MethodSynth
3.  case class Setter (tree: Global.ValDef) extends Namers.Namer.DerivedAccessor with Product with Serializable
   Definition Classes
     MethodSynth
4.  class AccessorTypeCompleter extends Analyzer.TypeCompleterBase[Global.ValDef]
5.  class ImportTypeCompleter extends Analyzer.TypeCompleterBase[Global.Import]
6.  class LogTransitions [S] extends AnyRef
7.  class ModuleClassTypeCompleter extends Analyzer.TypeCompleterBase[Global.ModuleDef]
8.  class MonoTypeCompleter extends Analyzer.TypeCompleterBase[Global.MemberDef]
9.  class SelfTypeCompleter extends Analyzer.TypeCompleterBase[Global.Tree]
10.  class ValTypeCompleter extends Analyzer.TypeCompleterBase[Global.ValDef]

### Value Members

1.  object NamerErrorGen
   Definition Classes
     NamerContextErrors
2.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
3.  final def ##(): Int
   Definition Classes
     AnyRef → Any
4.  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
5.  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()
6.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
7.  def accessorTypeCompleter(valDef: Global.ValDef, missingTpt: Boolean, isBean: Boolean, isSetter: Boolean): AccessorTypeCompleter
8.  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:

   1. 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)

9.  def addCopyMethod(cdef: Global.ClassDef, namer: Analyzer.Namer): Unit
10.  def annotSig(annotations: List[Global.Tree]): List[Global.AnnotationInfo]
11.  def applicableTypeParams(owner: Global.Symbol): List[Global.Symbol]
12.  def applyUnapplyMethodCompleter(un_applyDef: Global.DefDef, companionContext: Analyzer.Context): Analyzer.TypeCompleter
13.  final def asInstanceOf[T0]: T0
    Definition Classes
      Any
14.  def assignAndEnterFinishedSymbol(tree: Global.MemberDef): Global.Symbol
15.  def assignMemberSymbol(tree: Global.MemberDef, mask: Long = 1L): Global.Symbol
16.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
17.  def completerOf(tree: Global.MemberDef): Analyzer.TypeCompleter
18.  def conflict(newS: Global.Symbol, oldS: Global.Symbol): Boolean
    Attributes
      protected
19.  val context: Analyzer.Context
20.  def contextFile: AbstractFile
21.  def copyMethodCompleter(copyDef: Global.DefDef): Analyzer.TypeCompleter
22.  def createImportSymbol(tree: Global.Import): Global.TermSymbol
23.  def createInnerNamer(): Analyzer.Namer
24.  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.

25.  def createMethod(accessQual: Global.MemberDef, name: Global.TermName, pos: Global.Position, flags: Long): Global.MethodSymbol
26.  def createNamer(tree: Global.Tree): Analyzer.Namer
27.  def createPackageSymbol(pos: Global.Position, pid: Global.RefTree): Global.Symbol

    All PackageClassInfoTypes come from here.

28.  def createPrimaryConstructorParameterNamer: Analyzer.Namer
29.  def deriveAccessors(vd: Global.ValDef): Boolean
30.  def enclosingNamerWithScope(scope: Global.Scope): Analyzer.Namer
31.  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.

32.  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
33.  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
34.  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
35.  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
36.  def enterClassDef(tree: Global.ClassDef): Unit
37.  def enterClassSymbol(tree: Global.ClassDef): Global.Symbol
38.  def enterDefDef(tree: Global.DefDef): Unit
39.  def enterExistingSym(sym: Global.Symbol, tree: Global.Tree): Analyzer.Context
40.  def enterGetterSetter(tree: Global.ValDef): Unit
    Definition Classes
      MethodSynth
41.  def enterIfNotThere(sym: Global.Symbol): Unit
42.  def enterImplicitWrapper(classDef: Global.ClassDef): Unit
    Definition Classes
      MethodSynth
43.  def enterInScope(sym: Global.Symbol, scope: Global.Scope): Global.Symbol

    Enter symbol into given scope and return symbol itself

44.  def enterInScope(sym: Global.Symbol): Global.Symbol

    Enter symbol into context's scope and return symbol itself

45.  def enterModuleDef(tree: Global.ModuleDef): Global.Symbol
46.  def enterModuleSymbol(tree: Global.ModuleDef): Global.Symbol

    Enter a module symbol.

47.  def enterPackage(tree: Global.PackageDef): Unit
48.  def enterSelf(self: Global.ValDef): Unit
49.  def enterSym(tree: Global.Tree): Analyzer.Context
50.  def enterSyms(trees: List[Global.Tree]): Analyzer.Namer
51.  def enterSyntheticSym(tree: Global.Tree): Global.Symbol
52.  def enterTypeDef(tree: Global.TypeDef): Global.Symbol
53.  def enterValDef(tree: Global.ValDef): Unit
54.  def enterValueParams(vparamss: List[List[Global.ValDef]]): List[List[Global.Symbol]]
55.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
56.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
57.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
58.  def findCyclicalLowerBound(tp: Global.Type): Global.Symbol
59.  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()
60.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
61.  def handleSyntheticNameConflict(sym1: Global.Symbol, sym2: Global.Symbol): Unit

    Logic to handle name conflicts of synthetically generated symbols We handle right now: t6227

62.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
63.  def implicitFactoryMethodCompleter(tree: Global.DefDef, classSym: Global.Symbol): Analyzer.CompleterWrapper
64.  def importTypeCompleter(tree: Global.Import): ImportTypeCompleter
65.  def inConstructorFlag: Long
66.  def includeParent(tpe: Global.Type, parent: Global.Symbol): Global.Type
67.  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
68.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
69.  def moduleClassFlags(moduleFlags: Long): Long
70.  def moduleClassTypeCompleter(tree: Global.ModuleDef): ModuleClassTypeCompleter
71.  def monoTypeCompleter(tree: Global.MemberDef): MonoTypeCompleter
72.  def namerOf(sym: Global.Symbol): Analyzer.Namer
73.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
74.  final def notify(): Unit
    Definition Classes
      AnyRef
75.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
76.  def owner: Global.Symbol
    Attributes
      protected
77.  def saveDefaultGetter(meth: Global.Symbol, default: Global.Symbol): Unit
78.  def selfTypeCompleter(tree: Global.Tree): SelfTypeCompleter
79.  def setPrivateWithin(tree: Global.MemberDef, sym: Global.Symbol): Global.Symbol
80.  def setPrivateWithin[T <: Global.Symbol](tree: Global.Tree, sym: T, mods: Global.Modifiers): T
81.  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)

82.  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)

83.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
84.  def toString(): String
    Definition Classes
      AnyRef → Any
85.  def typeErrorHandler[T](tree: Global.Tree, alt: T): PartialFunction[Throwable, T]
86.  def typeSig(tree: Global.Tree, annotSigs: List[Global.AnnotationInfo]): 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).

87.  val typer: Analyzer.Typer
88.  def updatePosFlags(sym: Global.Symbol, pos: Global.Position, flags: Long): Global.Symbol
89.  def valTypeCompleter(tree: Global.ValDef): ValTypeCompleter
90.  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 classes
    - `override` modifier never for classes
    - `def` modifier never for parameters of case classes
    - declarations only in mixins or abstract classes (when not @native)
91.  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.

92.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
93.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
94.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
95.  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

### Inherited from Analyzer.NamerContextErrors

### Inherited from Analyzer.MethodSynth

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd from Analyzer.Namer to any2stringadd[Analyzer.Namer]

### Inherited by implicit conversion StringFormat from Analyzer.Namer to StringFormat[Analyzer.Namer]

### Inherited by implicit conversion Ensuring from Analyzer.Namer to Ensuring[Analyzer.Namer]

### Inherited by implicit conversion ArrowAssoc from Analyzer.Namer to ArrowAssoc[Analyzer.Namer]

### Ungrouped