Scala Compiler2.13.17 < 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 interactive
  Definition Classes
    nsc
-  trait InteractiveAnalyzer extends Analyzer
  Definition Classes
    interactive
- AbsAmbiguousTypeError
- AbsTypeError
- AccessTypeError
- Adaptation
- AdjustedTypeArgs
- AmbiguousImplicitTypeError
- AmbiguousTypeError
- AnalyzerPlugin
- ByNameFormatter
- CODE
- CacheAttachment
- CaseApplyDefaultGetters
- Checkability
- ClassForCaseCompanionAttachment
- ClassMethodSynthesis
- CompleterWrapper
- ConstructorDefaultsAttachment
- Context
- ContextReporter
- ContextWarning
- DefMacroExpander
- DefaultsOfLocalMethodAttachment
- DivergentImplicitTypeError
- DynamicRewriteAttachment
- ErrorUtils
- Function1
- FunctionFormatter
- HasMember
- HasMethodMatching
- HasUnapply
- ImplicitAmbiguousMsg
- ImplicitAnnotationMsg
- ImplicitError
- ImplicitErrorLink
- ImplicitErrorSpecifics
- ImplicitErrorTree
- ImplicitErrors
- ImplicitInfo
- ImplicitNotFoundMsg
- ImplicitSearch
- ImplicitsContextErrors
- ImportContext
- ImportInfo
- InferCheckable
- Inferencer
- InferencerContextErrors
- InteractiveNamer
- InteractiveTyper
- JavaReflectionResolvers
- LockingTypeCompleter
- MacroArgs
- MacroExpander
- MacroExpanderAttachment
- MacroExpansionAttachment
- MacroImplBinding
- MacroImplRefAttachment
- MacroPlugin
- MacroRuntimeAttachment
- MacroRuntimeResolver
- Message
- MethodSynth
- NamedApplyBlock
- NamedApplyInfo
- Namer
- NamerContextErrors
- NamesDefaultsErrorsGen
- NoContext
- NoInstance
- NormalTypeError
- OpenImplicit
- OriginalTreeAttachment
- PatternTyper
- PolyTypeCompleter
- PosAndMsgTypeError
- Refined
- RefinedFormatter
- RichTree
- SearchResult
- Shadower
- SilentResult
- SilentResultValue
- SilentTypeError
- SpecialFormatter
- SuperArgsAttachment
- SuppressMacroExpansionAttachment
- SymbolCompleterAttachment
- SymbolExpansionAttachment
- SymbolSourceAttachment
- SymbolTypeError
- Tag
- TreeTypeError
- TupleFormatter
- TypeCompleter
- TypeCompleterBase
- TypeDiag
- TypeErrorWithUnderlyingTree
- TypeErrorWrapper
- TypeParts
- Typer
- TyperContextErrors
- TyperDiagnostics
- UnapplyMemberResult
- UnusedPrivates
- WeakSymbolAttachment
- approximateAbstracts
- checkDead
- checkUnused
- instantiate
- namerFactory
- packageObjects
- toOrigin
- typerFactory
- typingStack

t

scala.tools.nsc.interactive.InteractiveAnalyzer

# InteractiveNamer

###

#### trait InteractiveNamer extends Namer

Source
  Global.scala

Linear Supertypes
InteractiveAnalyzer.Namer, InteractiveAnalyzer.NamerContextErrors, InteractiveAnalyzer.MethodSynth, AnyRef, Any
Type Hierarchy

Ordering

1. Alphabetic
2. By Inheritance

Inherited

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

Implicitly

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

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### 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]
   Definition Classes
     Namer
5.  class ImportTypeCompleter extends Analyzer.TypeCompleterBase[Global.Import]
   Definition Classes
     Namer
6.  class ModuleClassTypeCompleter extends Analyzer.TypeCompleterBase[Global.ModuleDef]
   Definition Classes
     Namer
7.  class MonoTypeCompleter extends Analyzer.TypeCompleterBase[Global.MemberDef]
   Definition Classes
     Namer
8.  class SelfTypeCompleter extends Analyzer.TypeCompleterBase[Global.Tree]
   Definition Classes
     Namer
9.  class ValTypeCompleter extends Analyzer.TypeCompleterBase[Global.ValDef]
   Definition Classes
     Namer

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  def +(other: String): String
   Implicit
     This member is added by an implicit conversion from InteractiveNamer toany2stringadd[InteractiveNamer] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
4.  def ->[B](y: B): (InteractiveNamer, B)
   Implicit
     This member is added by an implicit conversion from InteractiveNamer toArrowAssoc[InteractiveNamer] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
5.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
6.  def InferredImplicitError(tree: Global.Tree, inferred: Global.Type, cx: InteractiveAnalyzer.Context): Unit
   Definition Classes
     NamerContextErrors
7.  def accessorTypeCompleter(valDef: Global.ValDef, missingTpt: Boolean, isBean: Boolean, isSetter: Boolean): AccessorTypeCompleter
   Definition Classes
     Namer
8.  def addApplyUnapply(cdef: Global.ClassDef, namer: InteractiveAnalyzer.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)

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

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

    All PackageClassInfoTypes come from here.

    All PackageClassInfoTypes come from here.

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

    Definition Classes
      Namer
31.  def ensuring(cond: (InteractiveNamer) => Boolean, msg: => Any): InteractiveNamer
    Implicit
      This member is added by an implicit conversion from InteractiveNamer toEnsuring[InteractiveNamer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
32.  def ensuring(cond: (InteractiveNamer) => Boolean): InteractiveNamer
    Implicit
      This member is added by an implicit conversion from InteractiveNamer toEnsuring[InteractiveNamer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
33.  def ensuring(cond: Boolean, msg: => Any): InteractiveNamer
    Implicit
      This member is added by an implicit conversion from InteractiveNamer toEnsuring[InteractiveNamer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
34.  def ensuring(cond: Boolean): InteractiveNamer
    Implicit
      This member is added by an implicit conversion from InteractiveNamer toEnsuring[InteractiveNamer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
35.  def enterClassDef(tree: Global.ClassDef): Unit
    Definition Classes
      Namer
36.  def enterClassSymbol(tree: Global.ClassDef): Global.Symbol
    Definition Classes
      Namer
37.  def enterDefDef(tree: Global.DefDef): Unit
    Definition Classes
      Namer
38.  def enterDefaultGetters(meth: Global.Symbol, ddef: Global.DefDef, vparamss: List[List[Global.ValDef]], tparams: List[Global.TypeDef]): Unit

    For every default argument, insert a method symbol computing that default

    For every default argument, insert a method symbol computing that default

    Definition Classes
      Namer
39.  def enterExistingSym(sym: Global.Symbol, tree: Global.Tree): InteractiveAnalyzer.Context
    Definition Classes
      InteractiveNamer → Namer
40.  def enterGetterSetter(tree: Global.ValDef): Unit
    Definition Classes
      MethodSynth
41.  def enterIfNotThere(sym: Global.Symbol): Unit
    Definition Classes
      InteractiveNamer → Namer
42.  def enterImplicitWrapper(classDef: Global.ClassDef): Unit
    Definition Classes
      MethodSynth
43.  def enterInScope(sym: Global.Symbol, scope: Global.Scope): sym.type

    Enter symbol into given scope and return symbol itself

    Enter symbol into given scope and return symbol itself

    Definition Classes
      Namer
44.  def enterInScope(sym: Global.Symbol): sym.type

    Enter symbol into context's scope and return symbol itself

    Enter symbol into context's scope and return symbol itself

    Definition Classes
      Namer
45.  def enterModuleDef(tree: Global.ModuleDef): Unit
    Definition Classes
      Namer
46.  def enterModuleSymbol(tree: Global.ModuleDef): Global.Symbol

    Enter a module symbol.

    Enter a module symbol.

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

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

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

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

    Definition Classes
      Namer
82.  def standardEnterSym(tree: Global.Tree): InteractiveAnalyzer.Context

    Default implementation of `enterSym`.

    Default implementation of `enterSym`. Can be overridden by analyzer plugins (see AnalyzerPlugins.pluginsEnterSym for more details)

    Definition Classes
      Namer
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]
    Definition Classes
      Namer
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).

    Definition Classes
      Namer
87.  val typer: InteractiveAnalyzer.Typer
    Definition Classes
      Namer
88.  def updatePosFlags(sym: Global.Symbol, pos: Global.Position, flags: Long): sym.type
    Definition Classes
      Namer
89.  def valTypeCompleter(tree: Global.ValDef): ValTypeCompleter
    Definition Classes
      Namer
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)
    Definition Classes
      Namer
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.

    Given a ClassDef or ModuleDef, verifies there isn't a companion which has been defined in a separate file.

    Definition Classes
      Namer
92.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
93.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
94.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()
95.  object NamerErrorGen
    Definition Classes
      NamerContextErrors

### Deprecated Value Members

1.  def formatted(fmtstr: String): String
   Implicit
     This member is added by an implicit conversion from InteractiveNamer toStringFormat[InteractiveNamer] performed by method StringFormat in scala.Predef.
   Definition Classes
     StringFormat
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.12.16) Use `formatString.format(value)` instead of `value.formatted(formatString)`, or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.

2.  def →[B](y: B): (InteractiveNamer, B)
   Implicit
     This member is added by an implicit conversion from InteractiveNamer toArrowAssoc[InteractiveNamer] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Use `->` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

### Inherited from InteractiveAnalyzer.Namer

### Inherited from InteractiveAnalyzer.NamerContextErrors

### Inherited from InteractiveAnalyzer.MethodSynth

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd fromInteractiveNamer to any2stringadd[InteractiveNamer]

### Inherited by implicit conversion StringFormat fromInteractiveNamer to StringFormat[InteractiveNamer]

### Inherited by implicit conversion Ensuring fromInteractiveNamer to Ensuring[InteractiveNamer]

### Inherited by implicit conversion ArrowAssoc fromInteractiveNamer to ArrowAssoc[InteractiveNamer]

### Ungrouped