Class

scala.reflect.api.Trees

ImportExtractor

Related Doc: package Trees

Permalink

abstract class ImportExtractor extends AnyRef

An extractor class to create and pattern match with syntax Import(expr, selectors). This AST node corresponds to the following Scala code:

import expr.{selectors}

Selectors are a list of ImportSelectors, which conceptually are pairs of names (from, to). The last (and maybe only name) may be a nme.WILDCARD. For instance:

import qual.{x, y => z, _}

Would be represented as:

Import(qual, List(("x", "x"), ("y", "z"), (WILDCARD, null)))

The symbol of an Import is an import symbol @see Symbol.newImport. It's used primarily as a marker to check that the import has been typechecked.

Source
Trees.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ImportExtractor
  2. AnyRef
  3. 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 ImportExtractor()

    Permalink

Abstract Value Members

  1. abstract def apply(expr: Universe.Tree, selectors: List[Universe.ImportSelector]): Universe.Import

    Permalink
  2. abstract def unapply(import_: Universe.Import): Option[(Universe.Tree, List[Universe.ImportSelector])]

    Permalink