trait Imports extends AnyRef
- Alphabetic
- By Inheritance
- Imports
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Type Members
-
case class
ComputedImports(header: String, prepend: String, append: String, access: String) extends Product with Serializable
Compute imports that allow definitions from previous requests to be visible in a new request.
Compute imports that allow definitions from previous requests to be visible in a new request. Returns three or four pieces of related code:
0. Header code fragment that should go at the beginning of the compilation unit, specifically, import Predef.
- An initial code fragment that should go before the code of the new request.
2. A code fragment that should go after the code of the new request.
3. An access path which can be traversed to access any bindings inside code wrapped by #1 and #2 .
The argument is a set of Names that need to be imported.
Limitations: This method is not as precise as it could be. (1) It does not process wildcard imports to see what exactly they import. (2) If it imports any names from a request, it imports all of them, which is not really necessary. (3) It imports multiple same-named implicits, but only the last one imported is actually usable.
Value Members
- def allImportedNames: collection.immutable.List[Global.Name]
- def implicitSymbolsBySource: List[(Global.Symbol, List[Global.Symbol])]
- def importedSymbols: collection.immutable.List[Global.Symbol]
-
def
importedSymbolsBySource: List[(Global.Symbol, List[Global.Symbol])]
Tuples of (source, imported symbols) in the order they were imported.
- def importedTermSymbols: collection.immutable.List[Global.TermSymbol]
- def languageSymbols: collection.immutable.List[Global.Symbol]
- def languageWildcardHandlers: collection.immutable.List[(memberHandlers)#ImportHandler]
-
def
languageWildcardSyms: List[Global.Symbol]
Symbols whose contents are language-defined to be imported.
- def sessionImportedSymbols: collection.immutable.List[Global.Symbol]
-
def
sessionWildcards: List[Global.Type]
Types which have been wildcard imported, such as: val x = "abc" ; import x._ // type java.lang.String import java.lang.String._ // object java.lang.String
Types which have been wildcard imported, such as: val x = "abc" ; import x._ // type java.lang.String import java.lang.String._ // object java.lang.String
Used by tab completion.
XXX right now this gets import x._ and import java.lang.String._, but doesn't figure out import String._. There's a lot of ad hoc scope twiddling which should be swept away in favor of digging into the compiler scopes.
The Scala compiler and reflection APIs.