dotty.tools.dotc.ast.Trees

ValOrDefDef

Related Doc: package Trees

trait ValOrDefDef[-T >: Untyped] extends MemberDef[T] with WithLazyField[Tree[T]]

A ValDef or DefDef tree

Linear Supertypes
WithLazyField[Tree[T]], MemberDef[T], DefTree[T], NameTree[T], DenotingTree[T], Tree[T], Cloneable, Cloneable, Showable, Container, LinkSource, Positioned, Product, Equals, DotClass, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ValOrDefDef
  2. WithLazyField
  3. MemberDef
  4. DefTree
  5. NameTree
  6. DenotingTree
  7. Tree
  8. Cloneable
  9. Cloneable
  10. Showable
  11. Container
  12. LinkSource
  13. Positioned
  14. Product
  15. Equals
  16. DotClass
  17. AnyRef
  18. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract type ThisTree[-T >: Untyped] <: MemberDef[T]

    The type constructor at the root of the tree

    The type constructor at the root of the tree

    Definition Classes
    MemberDefDefTreeNameTreeDenotingTreeTree

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Definition Classes
    Equals
  2. abstract def force(x: AnyRef): Unit

    Attributes
    protected
    Definition Classes
    WithLazyField
  3. abstract def name: Name

    Definition Classes
    NameTree
  4. abstract def productArity: Int

    Definition Classes
    Product
  5. abstract def productElement(n: Int): Any

    Definition Classes
    Product
  6. abstract def tpt: Tree[T]

  7. abstract def unforced: AnyRef

    Definition Classes
    WithLazyField

Concrete Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. def addPos(pos: Position): ValOrDefDef.this.type

    This item with a position that's the union of the given pos and the current position.

    This item with a position that's the union of the given pos and the current position.

    Definition Classes
    Positioned
  5. final def allAttachments: List[(Key[_], Any)]

    The list of all keys and values attached to this container.

    The list of all keys and values attached to this container.

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

    Definition Classes
    Any
  7. final def attachment[V](key: Key[V]): V

    The attachment corresponding to key.

    The attachment corresponding to key.

    Definition Classes
    LinkSource
    Exceptions thrown

    NoSuchElementException if no attachment with key exists

  8. final def attachmentOrElse[V](key: Key[V], default: V): V

    The attachment corresponding to key, or default if no attachment with key exists.

    The attachment corresponding to key, or default if no attachment with key exists.

    Definition Classes
    LinkSource
  9. def checkPos(nonOverlapping: Boolean)(implicit ctx: Context): Unit

    Check that all positioned items in this tree satisfy the following conditions:

    Check that all positioned items in this tree satisfy the following conditions:

    • Parent positions contain child positions
    • If item is a non-empty tree, it has a position
    Definition Classes
    Positioned
  10. def clone(): Tree[T]

    Definition Classes
    Tree → AnyRef
  11. def contains(that: Positioned): Boolean

    Definition Classes
    Positioned
  12. def denot(implicit ctx: Context): Denotation

    The denotation referred tno by this tree.

    The denotation referred tno by this tree. Defined for DenotingTrees and ProxyTrees, NoDenotation for other kinds of trees

    Definition Classes
    DenotingTreeTree
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(that: Any): Boolean

    Definition Classes
    Tree → Equals → AnyRef → Any
  15. def fallbackToText(printer: Printer): Text

    A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

    A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

    Definition Classes
    Showable
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def forceIfLazy(implicit ctx: Context): Tree[T]

    Definition Classes
    WithLazyField
  18. def foreachInThicket(op: (Tree[T]) ⇒ Unit): Unit

    If this is a thicket, perform op on each of its trees otherwise, perform op ion tree itself.

    If this is a thicket, perform op on each of its trees otherwise, perform op ion tree itself.

    Definition Classes
    Tree
  19. final def getAttachment[V](key: Key[V]): Option[V]

    Optionally get attachment corresponding to key

    Optionally get attachment corresponding to key

    Definition Classes
    LinkSource
  20. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  21. final def hasType: Boolean

    Does the tree have its type field set? Note: this operation is not referentially transparent, because it can observe the withType modifications.

    Does the tree have its type field set? Note: this operation is not referentially transparent, because it can observe the withType modifications. Should be used only in special circumstances (we need it for printing trees with optional type info).

    Definition Classes
    Tree
  22. def hashCode(): Int

    Definition Classes
    Tree → AnyRef → Any
  23. def initialPos: Position

    The initial, synthetic position.

    The initial, synthetic position. This is usually the union of all positioned children's positions.

    Definition Classes
    Positioned
  24. def isDef: Boolean

    Does this tree define a new symbol that is not defined elsewhere?

    Does this tree define a new symbol that is not defined elsewhere?

    Definition Classes
    DefTreeTree
  25. def isEmpty: Boolean

    Is this tree either the empty tree or the empty ValDef?

    Is this tree either the empty tree or the empty ValDef?

    Definition Classes
    Tree
  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def isPattern: Boolean

    Is this a legal part of a pattern which is not at the same time a term?

    Is this a legal part of a pattern which is not at the same time a term?

    Definition Classes
    Tree
  28. def isTerm: Boolean

    Does this tree represent a term?

    Does this tree represent a term?

    Definition Classes
    Tree
  29. def isType: Boolean

    Does this tree represent a type?

    Does this tree represent a type?

    Definition Classes
    Tree
  30. def namePos: Position

    The position of the name defined by this definition.

    The position of the name defined by this definition. This is a point position if the definition is synthetic, or a range position if the definition comes from source. It might also be that the definition does not have a position (for instance when synthesized by a calling chain from viewExists), in that case the return position is NoPosition.

    Definition Classes
    MemberDef
  31. def namedType: NamedType

    Definition Classes
    DefTree
  32. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  35. def orElse[U >: Untyped <: T](that: ⇒ Tree[U]): Tree[U]

    if this tree is the empty tree, the alternative, else this tree

    if this tree is the empty tree, the alternative, else this tree

    Definition Classes
    Tree
  36. def pos: Position

    The item's position.

    The item's position.

    Definition Classes
    Positioned
  37. def productIterator: Iterator[Any]

    Definition Classes
    Product
  38. def productPrefix: String

    Definition Classes
    Product
  39. final def pushAttachment[V](key: Key[V], value: V): Unit

    Definition Classes
    Container
  40. final def putAttachment[V](key: Key[V], value: V): Option[V]

    Add attachment with given key and value.

    Add attachment with given key and value.

    returns

    Optionally, the old attachment with given key if one existed before. The new attachment is added at the position of the old one, or at the end if no attachment with same key existed.

    Definition Classes
    LinkSource
  41. def rawComment: Option[Comment]

    Definition Classes
    MemberDef
  42. final def removeAttachment[V](key: Key[V]): Option[V]

    Remove attachment with given key, if it exists.

    Remove attachment with given key, if it exists.

    returns

    Optionally, the removed attachment with given key if one existed before.

    Definition Classes
    LinkSource
  43. def rhs(implicit ctx: Context): Tree[T]

  44. def setComment(comment: Option[Comment]): ThisTree[Untyped]

    Definition Classes
    MemberDef
  45. def setMods(mods: Modifiers): Unit

    Attributes
    protected
    Definition Classes
    MemberDef
  46. def setPos(pos: Position): Unit

    Destructively update curPos to given position.

    Destructively update curPos to given position. Also, set any missing positions in children.

    Attributes
    protected
    Definition Classes
    Positioned
  47. def show(implicit ctx: Context): String

    The string representation of this showable element.

    The string representation of this showable element.

    Definition Classes
    Showable
  48. def showSummary(implicit ctx: Context): String

    Definition Classes
    Showable
  49. def showSummary(depth: Int)(implicit ctx: Context): String

    The summarized string representation of this showable element.

    The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

    Definition Classes
    Showable
  50. final def symbol(implicit ctx: Context): Symbol

    Shorthand for denot.symbol.

    Shorthand for denot.symbol.

    Definition Classes
    Tree
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  52. def toList: List[Tree[T]]

    Convert tree to a list.

    Convert tree to a list. Gives a singleton list, except for thickets which return their element trees.

    Definition Classes
    Tree
  53. def toString(): String

    Definition Classes
    AnyRef → Any
  54. def toText(printer: Printer): Text

    The text representation of this showable element.

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

    Definition Classes
    TreeShowable
  55. def tpe: T

    The type of the tree.

    The type of the tree. In case of an untyped tree, an UnAssignedTypeException is thrown. (Overridden by empty trees)

    Definition Classes
    Tree
  56. def treeSize: Int

    The number of nodes in this tree

    The number of nodes in this tree

    Definition Classes
    Tree
  57. final def typeOpt: Type

    Definition Classes
    Tree
  58. def unforcedRhs: LazyTree

  59. def uniqueId: Int

    Definition Classes
    Tree
  60. def unsupported(methodName: String): Nothing

    Throws an UnsupportedOperationException with the given method name.

    Throws an UnsupportedOperationException with the given method name.

    Definition Classes
    DotClass
  61. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. def withFlags(flags: FlagSet): ThisTree[Untyped]

    Definition Classes
    MemberDef
  65. def withMods(mods: Modifiers): ThisTree[Untyped]

    Definition Classes
    MemberDef
  66. def withPos(posd: Positioned): ValOrDefDef.this.type

    Definition Classes
    Positioned
  67. def withPos(pos: Position): ValOrDefDef.this.type

    A positioned item like this one with the position set to pos.

    A positioned item like this one with the position set to pos. if the positioned item is source-derived, a clone is returned. If the positioned item is synthetic, the position is updated destructively and the item itself is returned.

    Definition Classes
    Positioned
  68. def withType(tpe: Type)(implicit ctx: Context): ThisTree[Type]

    Return a typed tree that's isomorphic to this tree, but has given type.

    Return a typed tree that's isomorphic to this tree, but has given type. (Overridden by empty trees)

    Definition Classes
    Tree
  69. def withTypeUnchecked(tpe: Type): ThisTree[Type]

    Definition Classes
    Tree

Inherited from WithLazyField[Tree[T]]

Inherited from MemberDef[T]

Inherited from DefTree[T]

Inherited from NameTree[T]

Inherited from DenotingTree[T]

Inherited from Tree[T]

Inherited from Cloneable

Inherited from Cloneable

Inherited from Showable

Inherited from Container

Inherited from LinkSource

Inherited from Positioned

Inherited from Product

Inherited from Equals

Inherited from DotClass

Inherited from AnyRef

Inherited from Any

Ungrouped