scala.tools.nsc.typechecker.Contexts

ImportContext

trait ImportContext extends Analyzer.Context

A Context focussed on an Import tree

Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ImportContext
  2. Context
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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 information
    This member is added by an implicit conversion from Analyzer.ImportContext to any2stringadd[Analyzer.ImportContext] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Analyzer.ImportContext, B)

    Implicit information
    This member is added by an implicit conversion from Analyzer.ImportContext to ArrowAssoc[Analyzer.ImportContext] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  6. def ambiguousErrors: Boolean

    Definition Classes
    Context
  7. def apply(mask: ContextMode): Boolean

    Is this context in all modes in the given mask?

    Is this context in all modes in the given mask?

    Definition Classes
    Context
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def bufferErrors: Boolean

    Definition Classes
    Context
  10. def checking: Boolean

    Definition Classes
    Context
  11. def checking_=(value: Boolean): Unit

    Definition Classes
    Context
  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. var contextMode: ContextMode

    A bitmask containing all the boolean flags in a context, e.

    A bitmask containing all the boolean flags in a context, e.g. are implicit views enabled

    Definition Classes
    Context
  14. def defaultModeForTyped: Mode

    Definition Classes
    Context
  15. val depth: Int

    Definition Classes
    Context
  16. var diagnostic: List[String]

    These messages are printed when issuing an error

    These messages are printed when issuing an error

    Definition Classes
    Context
  17. var enclClass: Analyzer.Context

    The next outer context whose tree is a template or package definition

    The next outer context whose tree is a template or package definition

    Definition Classes
    Context
  18. def enclClassOrMethod: Analyzer.Context

    The next enclosing context (potentially this) that is owned by a class or method

    The next enclosing context (potentially this) that is owned by a class or method

    Definition Classes
    Context
  19. var enclMethod: Analyzer.Context

    The next outer context whose tree is a method

    The next outer context whose tree is a method

    Definition Classes
    Context
  20. def enclosingApply: Analyzer.Context

    .

    ...or an Apply.

    Definition Classes
    Context
  21. def enclosingCaseDef: Analyzer.Context

    The next enclosing context (potentially this) that has a CaseDef as a tree

    The next enclosing context (potentially this) that has a CaseDef as a tree

    Definition Classes
    Context
  22. def enclosingContextChain: List[Analyzer.Context]

    Definition Classes
    Context
  23. def enclosingSubClassContext(clazz: Global.Symbol): Analyzer.Context

    Return the closest enclosing context that defines a subclass of clazz or a companion object thereof, or NoContext if no such context exists.

    Return the closest enclosing context that defines a subclass of clazz or a companion object thereof, or NoContext if no such context exists.

    Definition Classes
    Context
  24. def enrichmentEnabled: Boolean

    Definition Classes
    Context
  25. def enrichmentEnabled_=(value: Boolean): Unit

    Definition Classes
    Context
  26. def ensuring(cond: (Analyzer.ImportContext) ⇒ Boolean, msg: ⇒ Any): Analyzer.ImportContext

    Implicit information
    This member is added by an implicit conversion from Analyzer.ImportContext to Ensuring[Analyzer.ImportContext] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  27. def ensuring(cond: (Analyzer.ImportContext) ⇒ Boolean): Analyzer.ImportContext

    Implicit information
    This member is added by an implicit conversion from Analyzer.ImportContext to Ensuring[Analyzer.ImportContext] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  28. def ensuring(cond: Boolean, msg: ⇒ Any): Analyzer.ImportContext

    Implicit information
    This member is added by an implicit conversion from Analyzer.ImportContext to Ensuring[Analyzer.ImportContext] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  29. def ensuring(cond: Boolean): Analyzer.ImportContext

    Implicit information
    This member is added by an implicit conversion from Analyzer.ImportContext to Ensuring[Analyzer.ImportContext] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  30. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  32. def error(pos: Global.Position, msg: String): Unit

    Issue/throw the given error message according to the current mode for error reporting.

    Issue/throw the given error message according to the current mode for error reporting.

    Definition Classes
    Context
  33. def error(pos: Global.Position, err: Throwable): Unit

    Issue/throw the given err according to the current mode for error reporting.

    Issue/throw the given err according to the current mode for error reporting.

    Definition Classes
    Context
  34. def errors: Seq[Analyzer.AbsTypeError]

    Definition Classes
    Context
  35. def extractUndetparams(): List[Global.Symbol]

    Return and clear the undetermined type parameters

    Return and clear the undetermined type parameters

    Definition Classes
    Context
  36. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. def firstError: Option[Analyzer.AbsTypeError]

    The first error, if any, in the report buffer

    The first error, if any, in the report buffer

    Definition Classes
    Context
  38. final def firstImport: Some[Analyzer.ImportInfo]

    Equivalent to imports.headOption, but more efficient

    Equivalent to imports.headOption, but more efficient

    Definition Classes
    ImportContextContext
  39. def flushAndIssueWarnings(): Unit

    Issue and clear all warnings from the report buffer

    Issue and clear all warnings from the report buffer

    Definition Classes
    Context
  40. def flushAndReturnBuffer(): collection.immutable.Seq[Analyzer.AbsTypeError]

    Return and clear all errors from the report buffer

    Return and clear all errors from the report buffer

    Definition Classes
    Context
  41. def flushBuffer(): Unit

    Clear all errors from the report buffer

    Clear all errors from the report buffer

    Definition Classes
    Context
  42. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Analyzer.ImportContext to StringFormat[Analyzer.ImportContext] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  43. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  44. def hasErrors: Boolean

    Does the report buffer contain any errors?

    Does the report buffer contain any errors?

    Definition Classes
    Context
  45. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  46. def implicitsEnabled: Boolean

    Definition Classes
    Context
  47. def implicitsEnabled_=(value: Boolean): Unit

    Definition Classes
    Context
  48. def implicitss: List[List[Analyzer.ImplicitInfo]]

    Definition Classes
    Context
  49. def importedAccessibleSymbol(imp: Analyzer.ImportInfo, name: Global.Name): Global.Symbol

    The symbol with name name imported via the import in imp, if any such symbol is accessible from this context.

    The symbol with name name imported via the import in imp, if any such symbol is accessible from this context.

    Definition Classes
    Context
  50. final def imports: collection.immutable.List[Analyzer.ImportInfo]

    The currently visible imports

    The currently visible imports

    Definition Classes
    ImportContextContext
  51. def inConstructorSuffix: Boolean

    Definition Classes
    Context
  52. def inConstructorSuffix_=(value: Boolean): Unit

    Definition Classes
    Context
  53. def inPatAlternative: Boolean

    Definition Classes
    Context
  54. def inPatAlternative_=(value: Boolean): Unit

    Definition Classes
    Context
  55. def inReturnExpr: Boolean

    Definition Classes
    Context
  56. def inSecondTry: Boolean

    Definition Classes
    Context
  57. def inSecondTry_=(value: Boolean): Unit

    Definition Classes
    Context
  58. def inSelfSuperCall: Boolean

    Definition Classes
    Context
  59. def inSelfSuperCall_=(value: Boolean): Unit

    Definition Classes
    Context
  60. final def inSilentMode(expr: ⇒ Boolean): Boolean

    returns

    true if the expr evaluates to true within a silent Context that incurs no errors

    Definition Classes
    Context
    Annotations
    @inline()
  61. def inSuperInit: Boolean

    Definition Classes
    Context
  62. def inSuperInit_=(value: Boolean): Unit

    Definition Classes
    Context
  63. def inTypeConstructorAllowed: Boolean

    Definition Classes
    Context
  64. def isAccessible(sym: Global.Symbol, pre: Global.Type, superAccess: Boolean = false): Boolean

    Is sym accessible as a member of pre in current context?

    Is sym accessible as a member of pre in current context?

    Definition Classes
    Context
  65. def isInPackageObject(sym: Global.Symbol, pkg: Global.Symbol): Boolean

    Is sym defined in package object of package pkg? Since sym may be defined in some parent of the package object, we cannot inspect its owner only; we have to go through the info of the package object.

    Is sym defined in package object of package pkg? Since sym may be defined in some parent of the package object, we cannot inspect its owner only; we have to go through the info of the package object. However to avoid cycles we'll check what other ways we can before pushing that way.

    Definition Classes
    Context
  66. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  67. def isNameInScope(name: Global.Name): Boolean

    Definition Classes
    Context
  68. final def isRootImport: Boolean

    Definition Classes
    ImportContextContext
  69. def issue(err: Analyzer.AbsTypeError): Unit

    Issue/buffer/throw the given type error according to the current mode for error reporting.

    Issue/buffer/throw the given type error according to the current mode for error reporting.

    Definition Classes
    Context
  70. def issueAmbiguousError(err: Analyzer.AbsTypeError): Unit

    Issue/buffer/throw the given implicit ambiguity error according to the current mode for error reporting.

    Issue/buffer/throw the given implicit ambiguity error according to the current mode for error reporting.

    Definition Classes
    Context
  71. def issueAmbiguousError(pre: Global.Type, sym1: Global.Symbol, sym2: Global.Symbol, err: Analyzer.AbsTypeError): Unit

    Issue/buffer/throw the given implicit ambiguity error according to the current mode for error reporting.

    Issue/buffer/throw the given implicit ambiguity error according to the current mode for error reporting.

    Definition Classes
    Context
  72. def lookup(name: Global.Name, expectedOwner: Global.Symbol): Global.Symbol

    Find a symbol in this context or one of its outers.

    Find a symbol in this context or one of its outers.

    Used to find symbols are owned by methods (or fields), they can't be found in some scope.

    Examples: companion module of classes owned by a method, default getter methods of nested methods. See NamesDefaults.scala

    Definition Classes
    Context
  73. def lookupSymbol(name: Global.Name, qualifies: (Global.Symbol) ⇒ Boolean): Global.NameLookup

    Find the symbol of a simple name starting from this context.

    Find the symbol of a simple name starting from this context. All names are filtered through the "qualifies" predicate, the search continuing as long as no qualifying name is found.

    Definition Classes
    Context
  74. def macrosEnabled: Boolean

    Definition Classes
    Context
  75. def macrosEnabled_=(value: Boolean): Unit

    Definition Classes
    Context
  76. def make(tree: Global.Tree, owner: Global.Symbol, scope: Global.Scope): Analyzer.Context

    Definition Classes
    Context
  77. def make(tree: Global.Tree = tree, owner: Global.Symbol = owner, scope: Global.Scope = scope, unit: Global.CompilationUnit = unit): Analyzer.Context

    Construct a child context.

    Construct a child context. The parent and child will share the report buffer. Compare with makeSilent, in which the child has a fresh report buffer.

    If tree is an Import, that import will be avaiable at the head of Context#imports.

    Definition Classes
    Context
  78. def makeConstructorContext: Analyzer.Context

    A context for typing constructor parameter ValDefs, super or self invocation arguments and default getters of constructors.

    A context for typing constructor parameter ValDefs, super or self invocation arguments and default getters of constructors. These expressions need to be type checked in a scope outside the class, cf. spec 5.3.1.

    This method is called by namer / typer where this is the context for the constructor DefDef. The owner of the resulting (new) context is the outer context for the Template, i.e. the context for the ClassDef. This means that class type parameters will be in scope. The value parameters of the current constructor are also entered into the new constructor scope. Members of the class however will not be accessible.

    Definition Classes
    Context
  79. def makeImplicit(reportAmbiguousErrors: Boolean): Analyzer.Context

    Make a silent child context does not allow implicits.

    Make a silent child context does not allow implicits. Used to prevent chaining of implicit views.

    Definition Classes
    Context
  80. def makeNewScope(tree: Global.Tree, owner: Global.Symbol): Analyzer.Context

    Make a child context that represents a new nested scope

    Make a child context that represents a new nested scope

    Definition Classes
    Context
  81. def makeSilent(reportAmbiguousErrors: Boolean = ambiguousErrors, newtree: Global.Tree = tree): Analyzer.Context

    Make a child context that buffers errors and warnings into a fresh report buffer.

    Make a child context that buffers errors and warnings into a fresh report buffer.

    Definition Classes
    Context
  82. var namedApplyBlockInfo: Option[(Global.Tree, Analyzer.NamedApplyInfo)]

    Definition Classes
    Context
  83. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  84. def nextEnclosing(p: (Analyzer.Context) ⇒ Boolean): Analyzer.Context

    Definition Classes
    Context
  85. final def notify(): Unit

    Definition Classes
    AnyRef
  86. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  87. var openImplicits: List[Analyzer.OpenImplicit]

    Types for which implicit arguments are currently searched

    Types for which implicit arguments are currently searched

    Definition Classes
    Context
  88. final def outer: Analyzer.Context

    Definition Classes
    Context
  89. def outerDepth: Int

    Attributes
    protected
    Definition Classes
    Context
  90. val owner: Global.Symbol

    The current owner

    The current owner

    Definition Classes
    Context
  91. var prefix: Global.Type

    Definition Classes
    Context
  92. def pushTypeBounds(sym: Global.Symbol): Unit

    Definition Classes
    Context
  93. def reportBuffer: Analyzer.ReportBuffer

    A buffer for errors and warnings, used with this.bufferErrors == true

    A buffer for errors and warnings, used with this.bufferErrors == true

    Definition Classes
    Context
  94. def reportErrors: Boolean

    Definition Classes
    Context
  95. def resetCache(): Unit

    Definition Classes
    Context
  96. def restoreReportBuffer(other: Analyzer.ReportBuffer): Unit

    Discard the current report buffer, and replace with other

    Discard the current report buffer, and replace with other

    Definition Classes
    Context
  97. def restoreTypeBounds(tp: Global.Type): Global.Type

    Definition Classes
    Context
  98. def returnsSeen: Boolean

    Definition Classes
    Context
  99. def returnsSeen_=(value: Boolean): Unit

    Definition Classes
    Context
  100. def retyping: Boolean

    Definition Classes
    Context
  101. def retyping_=(value: Boolean): Unit

    Definition Classes
    Context
  102. var savedTypeBounds: List[(Global.Symbol, Global.Type)]

    Saved type bounds for type parameters which are narrowed in a GADT.

    Saved type bounds for type parameters which are narrowed in a GADT.

    Definition Classes
    Context
  103. def savingUndeterminedTypeParams[A](reportAmbiguous: Boolean = ambiguousErrors)(body: ⇒ A): A

    Run body with this context with no undetermined type parameters, restore the original the original list afterwards.

    Run body with this context with no undetermined type parameters, restore the original the original list afterwards.

    reportAmbiguous

    Should ambiguous errors be reported during evaluation of body?

    Definition Classes
    Context
  104. val scope: Global.Scope

    The current scope

    The current scope

    Definition Classes
    Context
  105. def set(enable: ContextMode = NOmode, disable: ContextMode = NOmode): ImportContext.this.type

    Set all modes in the mask enable to true, and all in disable to false.

    Set all modes in the mask enable to true, and all in disable to false.

    Definition Classes
    Context
  106. def setAmbiguousErrors(report: Boolean): Unit

    Definition Classes
    Context
  107. def setBufferErrors(): Unit

    Definition Classes
    Context
  108. def setReportErrors(): Unit

    Definition Classes
    Context
  109. def setThrowErrors(): Unit

    Definition Classes
    Context
  110. def siteString: String

    Definition Classes
    Context
  111. def starPatterns: Boolean

    Definition Classes
    Context
  112. def starPatterns_=(value: Boolean): Unit

    Definition Classes
    Context
  113. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  114. def throwErrors: Boolean

    Definition Classes
    Context
  115. final def toString(): String

    Definition Classes
    ImportContextContext → AnyRef → Any
  116. val tree: Global.Tree

    Tree associated with this context

    Tree associated with this context

    Definition Classes
    Context
  117. def undetparams: List[Global.Symbol]

    Undetermined type parameters.

    Undetermined type parameters. See Infer#{inferExprInstance, adjustTypeArgs}. Not inherited to child contexts

    Definition Classes
    Context
  118. def undetparamsString: String

    Definition Classes
    Context
  119. def undetparams_=(ps: List[Global.Symbol]): Unit

    Definition Classes
    Context
  120. val unit: Global.CompilationUnit

    Definition Classes
    Context
  121. def update(mask: ContextMode, value: Boolean): Unit

    Update all modes in mask to value

    Update all modes in mask to value

    Definition Classes
    Context
  122. def updateBuffer(errors: Traversable[Analyzer.AbsTypeError]): Analyzer.ReportBuffer

    Append the given errors to the report buffer

    Append the given errors to the report buffer

    Definition Classes
    Context
  123. def useFreshReportBuffer(): Unit

    Discard the current report buffer, and replace with an empty one

    Discard the current report buffer, and replace with an empty one

    Definition Classes
    Context
  124. var variance: Variance

    Variance relative to enclosing class

    Variance relative to enclosing class

    Definition Classes
    Context
  125. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  126. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  127. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  128. def warning(pos: Global.Position, msg: String, force: Boolean = false): Unit

    Issue/throw the given error message according to the current mode for error reporting.

    Issue/throw the given error message according to the current mode for error reporting.

    Definition Classes
    Context
  129. final def withImplicitsDisabled[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  130. final def withImplicitsDisabledAllowEnrichment[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  131. final def withImplicitsEnabled[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  132. final def withMacrosDisabled[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  133. final def withMacrosEnabled[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  134. def withMode[T](enabled: ContextMode = NOmode, disabled: ContextMode = NOmode)(op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  135. final def withOnlyStickyModes[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  136. final def withinPatAlternative[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  137. final def withinReturnExpr[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  138. final def withinSecondTry[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  139. final def withinStarPatterns[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  140. final def withinSuperInit[T](op: ⇒ T): T

    Definition Classes
    Context
    Annotations
    @inline()
  141. final def withinTypeConstructorAllowed[T](op: ⇒ T): T

    TypeConstructorAllowed is enabled when we are typing a higher-kinded type.

    TypeConstructorAllowed is enabled when we are typing a higher-kinded type. adapt should then check kind-arity based on the prototypical type's kind arity. Type arguments should not be inferred.

    Definition Classes
    Context
    Annotations
    @inline()
  142. def [B](y: B): (Analyzer.ImportContext, B)

    Implicit information
    This member is added by an implicit conversion from Analyzer.ImportContext to ArrowAssoc[Analyzer.ImportContext] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Analyzer.Context

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Analyzer.ImportContext to any2stringadd[Analyzer.ImportContext]

Inherited by implicit conversion StringFormat from Analyzer.ImportContext to StringFormat[Analyzer.ImportContext]

Inherited by implicit conversion Ensuring from Analyzer.ImportContext to Ensuring[Analyzer.ImportContext]

Inherited by implicit conversion ArrowAssoc from Analyzer.ImportContext to ArrowAssoc[Analyzer.ImportContext]

Ungrouped