scala.tools.refactoring.analysis.ScopeAnalysis

LocalScope

case class LocalScope(enclosing: nsc.Global.Tree, decls: List[nsc.Global.DefTree], outerScope: Option[ScopeTree], knownSymbols: List[nsc.Global.Symbol] = immutable.this.Nil) extends ScopeTree with Product with Serializable

Declarations of values and types that are not class members are transformed to LocalScopes. This also includes parameter lists and bindings in case statements.

One LocalScope can also represent more than one declaration if it is constructed from parameter lists or bindings.

Linear Supertypes
Serializable, java.io.Serializable, Product, Equals, ScopeTree, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LocalScope
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ScopeTree
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LocalScope(enclosing: nsc.Global.Tree, decls: List[nsc.Global.DefTree], outerScope: Option[ScopeTree], knownSymbols: List[nsc.Global.Symbol] = immutable.this.Nil)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def copy(outerScope: Option[ScopeTree], knownSymbols: List[nsc.Global.Symbol]): LocalScope

    Definition Classes
    LocalScopeScopeTree
  9. val declPos: nsc.Global.Position

  10. val decls: List[nsc.Global.DefTree]

  11. val enclosing: nsc.Global.Tree

    A tree that fully encloses this scope.

    A tree that fully encloses this scope.

    Definition Classes
    LocalScopeScopeTree
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def findScopeFor(pos: nsc.Global.Position): ScopeTree

    Traverses the scope tree from inner to outer and returns the innermost scope, that is visible from pos.

    Traverses the scope tree from inner to outer and returns the innermost scope, that is visible from pos.

    Definition Classes
    LocalScopeScopeTree
  15. def findScopeFor(t: nsc.Global.Tree): ScopeTree

    Traverses the scope tree from inner to outer and returns the innermost scope, that is visible from t.

    Traverses the scope tree from inner to outer and returns the innermost scope, that is visible from t.

    Definition Classes
    ScopeTree
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def introducedInThisScope(s: nsc.Global.Symbol): Boolean

    Is s visible in this scope, but not in outerScope?

    Is s visible in this scope, but not in outerScope?

    Definition Classes
    LocalScopeScopeTree
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. val knownSymbols: List[nsc.Global.Symbol]

    Symbols from which we know that they are visible in this scope.

    Symbols from which we know that they are visible in this scope.

    Definition Classes
    LocalScopeScopeTree
  20. def nameCollisions(name: String): List[nsc.Global.Symbol]

    Returns a list of visible symbols whose name is equal to name.

    Returns a list of visible symbols whose name is equal to name. TODO: Handle symbols from other CUs

    Definition Classes
    ScopeTree
  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

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

    Definition Classes
    AnyRef
  24. val outerScope: Option[ScopeTree]

    A scope that contains this scope in the "physical" structure.

    A scope that contains this scope in the "physical" structure.

    Definition Classes
    LocalScopeScopeTree
  25. lazy val outermostScope: ScopeTree

    The outermost scope known.

    The outermost scope known. Usually the package scope of the CU.

    Definition Classes
    ScopeTree
  26. def sees(s: nsc.Global.Symbol): Boolean

    Is s visible (and accessible) from this scope?

    Is s visible (and accessible) from this scope?

    Definition Classes
    ScopeTree
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

    Definition Classes
    LocalScope → AnyRef → Any
  29. def toString(className: String, identName: String): String

    Definition Classes
    ScopeTree
  30. val visibleScopes: List[ScopeTree]

    Scopes that are visible from this scope.

    Scopes that are visible from this scope.

    Definition Classes
    ScopeTree
  31. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def withKnownSymbols(syms: List[nsc.Global.Symbol]): ScopeTree

    Returns a copy of this scope with syms registered as known symbols.

    Returns a copy of this scope with syms registered as known symbols. Also propagates all symbols of syms, that are not introduces in this scope to outerScope.

    Register symbols as known symbols increases the performance of sees(s) and helps to reduce the number of false negatives. This is because it is easier to determine if a symbol is introduced by a scope than if it is not introduced by it.

    Definition Classes
    ScopeTree

Inherited from Serializable

Inherited from java.io.Serializable

Inherited from Product

Inherited from Equals

Inherited from ScopeTree

Inherited from AnyRef

Inherited from Any

Ungrouped