class ImportInfo
extends Showable

Info relating to an import clause

Constructors

ImportInfo ( symf: Context => Symbol , selectors: List [ Tree ] , symNameOpt: Option [ TermName ] , isRootImport: Boolean )

Members

val isRootImport : Boolean
private var myExcluded : Set [ TermName ]
private var myMapped : SimpleMap [ TermName, TermName ]
private var myOriginals : Set [ TermName ]
private var mySym : Symbol
private var myUnimported : Symbol
private var myWildcardImport : Boolean
val selectors : List [ Tree ]
private val symNameOpt : Option [ TermName ]
private val symf : Context => Symbol
private def ensureInitialized ( ) : Unit

Compute info relating to the selector list

Compute info relating to the selector list

def excluded : Set [ TermName ]

The names that are excluded from any wildcard import

The names that are excluded from any wildcard import

def importedImplicits ( implicit ctx: Context ) : List [ TermRef ]

The implicit references imported by this import clause

The implicit references imported by this import clause

def isWildcardImport : Boolean

Does the import clause end with wildcard?

Does the import clause end with wildcard?

private def myExcluded_= ( x$1: Set [ TermName ] ) : Unit
private def myMapped_= ( x$1: SimpleMap [ TermName, TermName ] ) : Unit
private def myOriginals_= ( x$1: Set [ TermName ] ) : Unit
private def myWildcardImport_= ( x$1: Boolean ) : Unit
def originals : Set [ TermName ]

The original names imported by-name before renaming

The original names imported by-name before renaming

def reverseMapping : SimpleMap [ TermName, TermName ]

A mapping from renamed to original names

A mapping from renamed to original names

def site ( implicit ctx: Context ) : Type

The (TermRef) type of the qualifier of the import clause

The (TermRef) type of the qualifier of the import clause

def sym ( implicit ctx: Context ) : Symbol
def toText ( printer: Printer ) : Text

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

[+] def unimported ( implicit ctx: Context ) : Symbol

The root import symbol hidden by this symbol, or NoSymbol if no such symbol is hidden. Note: this computation needs to work even for un-initialized imp...

override import Predef.{any2stringAdd => _, StringAdd => _, _} // disables String +
override import java.lang.{}                                   // disables all imports

The root import symbol hidden by this symbol, or NoSymbol if no such symbol is hidden. Note: this computation needs to work even for un-initialized import infos, and is not allowed to force initialization.

TODO: Once we have fully bootstrapped, I would prefer if we expressed unimport with an override modifier, and generalized it to all imports. I believe this would be more transparent than the current set of conditions. E.g.

override import Predef.{any2stringAdd => _, StringAdd => _, _} // disables String +
override import java.lang.{}                                   // disables all imports