scala.tools.refactoring.common.Selections

Selection

trait Selection extends AnyRef

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Selection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def file: AbstractFile

  2. abstract val pos: RangePosition

  3. abstract val root: nsc.Global.Tree

Concrete 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 contains(t: nsc.Global.Tree): Boolean

    Returns true if the given Tree is fully contained in the selection.

  9. lazy val enclosingTree: nsc.Global.Tree

    Returns the tree that encloses the whole selection.

  10. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  12. def expand: (Selections.this)#Selection

    Expands the selection in such a way, that partially selected trees are completely selected.

  13. def expandTo[T <: nsc.Global.Tree](implicit m: Manifest[T]): Option[(Selections.this)#Selection]

    Expands to a specific type of tree.

  14. def expandTo(tree: nsc.Global.Tree): Option[(Selections.this)#Selection]

    Tries to expand the selection to tree if the current selection contains only subtrees of tree.

  15. def expandTo(newPos: nsc.Global.Position): Option[(Selections.this)#Selection]

    Tries to expand the selection to newPos.

  16. def expandTo(pred: ((Selections.this)#Selection) ⇒ Boolean): Option[(Selections.this)#Selection]

    Expands the selection until pred evaluates to true.

  17. def expandToNextEnclosingTree: Option[(Selections.this)#Selection]

    Tries to expand the selection to a tree that fully contains the selection but is not equal to the selection.

  18. def filterSelected(predicate: (nsc.Global.Tree) ⇒ Boolean): List[nsc.Global.Tree]

  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def findSelectedOfType[T](implicit m: Manifest[T]): Option[T]

    Finds a selected tree by its type.

    Finds a selected tree by its type.

    See also

    findSelectedWithPredicate for more information

  21. def findSelectedWithPredicate(predicate: (nsc.Global.Tree) ⇒ Boolean): Option[nsc.Global.Tree]

    Finds a selected tree by a predicate.

    Finds a selected tree by a predicate. The tree does not have to be selected completely, it is only checked whether this selection is contained in the tree.

    If multiple trees of the type are found, the last one (i.e. the deepest child) is returned.

  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. lazy val inboundDeps: List[nsc.Global.Symbol]

    Returns a list of symbols that are used inside the selection but defined outside of it.

  25. def inboundDepsOwnedBy(owner: nsc.Global.Symbol): List[nsc.Global.Symbol]

    Returns only inbound dependencies that are directly or indirectly owned by owner.

  26. lazy val inboundLocalDeps: List[nsc.Global.Symbol]

    Returns inbound dependencies that are owned by the outmost enclosing class or object in the CU.

  27. def isContainedIn(t: nsc.Global.Tree): Boolean

    Returns true if the given Tree fully contains this selection.

  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. lazy val isSingleTree: Boolean

  30. lazy val mayHaveSideEffects: Boolean

    Tries to determine if the selected code contains side effects.

    Tries to determine if the selected code contains side effects.

    Caution: mayHaveSideEffects == false does not guarantee that selection has no side effects.

    The current implementation does check if the selection contains a reference to a symbol that has a type that is somehow related to Unit.

  31. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  34. lazy val outboundLocalDeps: List[nsc.Global.Symbol]

    Returns a list of symbols that are defined inside the selection and used outside of it.

    Returns a list of symbols that are defined inside the selection and used outside of it.

    This implementation does not use index lookups and therefore returns only outbound dependencies that are used in the same compilation unit. However, this affects only class member definitions.

    It also does not cover outbound dependencies that are imported through an import statement in the selected code.

  35. lazy val reassignedDeps: collection.immutable.List[nsc.Global.Symbol]

    All inbound dependencies that are reassigned in the selected code and used afterwards.

  36. lazy val representsArgument: Boolean

  37. lazy val representsParameter: Boolean

  38. lazy val representsValue: Boolean

    Is true if the selected code could be replaced by a value.

    Is true if the selected code could be replaced by a value.

    E.g. the selected code represents a value although it consists of more than one expression: def fn = { /*(*/al a = 2 a * 100/*)*/ * } it is replaceable by 200 without changing the methods return value.

    Note, this implementation assumes that the code has no side effects.

  39. lazy val representsValueDefinitions: Boolean

    Is true if the selected code contains only value definitions.

  40. lazy val selectedSymbolTree: Option[nsc.Global.SymTree]

    Tries to find the selected SymTree: first it is checked if the selection fully contains a SymTree, if true, the first selected is returned.

    Tries to find the selected SymTree: first it is checked if the selection fully contains a SymTree, if true, the first selected is returned. Otherwise the result of findSelectedOfType[SymTree] is returned.

  41. lazy val selectedSymbols: collection.immutable.List[nsc.Global.Symbol]

    Returns all symbols that are either used or defined in the selected trees and their children.

  42. lazy val selectedTopLevelTrees: List[nsc.Global.Tree]

    Returns all selected trees that are not children of other selected trees.

  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def toString(): String

    Definition Classes
    Selection → AnyRef → Any
  45. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. def withPos(newPos: nsc.Global.Position): (Selections.this)#Selection

Inherited from AnyRef

Inherited from Any

Ungrouped