treehugger.api.Trees

ValDef

case class ValDef(mods: Universe.Modifiers, lhs: Universe.Tree, rhs: Universe.Tree) extends Universe.ValOrDefDef with Product with Serializable

A constant value definition (this includes vars as well, which differ from vals only in having the MUTABLE flag set in their Modifiers.)

Linear Supertypes
Serializable, Serializable, Universe.ValOrDefDef, Universe.MemberDef, Universe.DefTree, Universe.SymTree, Universe.Tree, Product, Equals, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ValDef
  2. Serializable
  3. Serializable
  4. ValOrDefDef
  5. MemberDef
  6. DefTree
  7. SymTree
  8. Tree
  9. Product
  10. Equals
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ValDef(mods: Universe.Modifiers, lhs: Universe.Tree, rhs: Universe.Tree)

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 children: List[Universe.Tree]

    The direct child trees of this tree.

    The direct child trees of this tree. EmptyTrees are always omitted. Lists are flattened.

    Definition Classes
    Tree
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def defineType(tp: Universe.Type): ValDef.this.type

    Like setType, but if this is a previously empty TypeTree that fact is remembered so that resetAllAttrs will snap back.

    Like setType, but if this is a previously empty TypeTree that fact is remembered so that resetAllAttrs will snap back.

    Attempting to elaborate on the above, I find: If defineType is called on a TypeTree whose type field is null or NoType, this is recorded as "wasEmpty = true". That value is used in ResetAttrsTraverser, which nulls out the type field of TypeTrees for which wasEmpty is true, leaving the others alone.

    resetAllAttrs is used in situations where some speculative typing of a tree takes place, fails, and the tree needs to be returned to its former state to try again. So according to me: using defineType instead of setType is how you communicate that the type being set does not depend on any previous state, and therefore should be abandoned if the current line of type inquiry doesn't work out.

    Definition Classes
    Tree
  10. val emptyTermName: Universe.TermName

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

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

    Definition Classes
    Tree → Equals → AnyRef → Any
  13. def equalsStructure(that: Universe.Tree): Boolean

    Definition Classes
    Tree
  14. def equalsStructure0(that: Universe.Tree)(f: (Universe.Tree, Universe.Tree) ⇒ Boolean): Boolean

    Definition Classes
    Tree
  15. def exists(p: (Universe.Tree) ⇒ Boolean): Boolean

    Is there part of this tree which satisfies predicate p?

    Is there part of this tree which satisfies predicate p?

    Definition Classes
    Tree
  16. def filter(f: (Universe.Tree) ⇒ Boolean): List[Universe.Tree]

    Find all subtrees matching predicate p

    Find all subtrees matching predicate p

    Definition Classes
    Tree
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  18. def find(p: (Universe.Tree) ⇒ Boolean): Option[Universe.Tree]

    Returns optionally first tree (in a preorder traversal) which satisfies predicate p, or None if none exists.

    Returns optionally first tree (in a preorder traversal) which satisfies predicate p, or None if none exists.

    Definition Classes
    Tree
  19. def foreach(f: (Universe.Tree) ⇒ Unit): Unit

    Apply f to each subtree

    Apply f to each subtree

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

    Definition Classes
    AnyRef → Any
  21. def hasSymbol: Boolean

    Definition Classes
    SymTreeTree
  22. def hasSymbolWhich(f: (Universe.Symbol) ⇒ Boolean): Boolean

    Definition Classes
    Tree
  23. def hashCode(): Int

    Definition Classes
    Tree → AnyRef → Any
  24. val id: Int

    Definition Classes
    Tree
  25. def isDef: Boolean

    Definition Classes
    DefTreeTree
  26. def isEmpty: Boolean

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

    Definition Classes
    Any
  28. def isTerm: Boolean

    The canonical way to test if a Tree represents a term.

    The canonical way to test if a Tree represents a term.

    Definition Classes
    Tree
  29. def isType: Boolean

    The canonical way to test if a Tree represents a type.

    The canonical way to test if a Tree represents a type.

    Definition Classes
    Tree
  30. def keyword: String

    Definition Classes
    MemberDef
  31. val lhs: Universe.Tree

  32. val mods: Universe.Modifiers

    Definition Classes
    ValDefMemberDef
  33. def name: Universe.Name

    Definition Classes
    ValDefValOrDefDefDefTree
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  37. def pos: Position

    Definition Classes
    Tree
  38. def pos_=(pos: Position): Unit

    Definition Classes
    Tree
  39. val rhs: Universe.Tree

    Definition Classes
    ValDefValOrDefDef
  40. def setPos(pos: Position): ValDef.this.type

    Definition Classes
    Tree
  41. def setSymbol(sym: Universe.Symbol): ValDef.this.type

    Definition Classes
    Tree
  42. def setType(tp: Universe.Type): ValDef.this.type

    Set tpe to give tp and return this.

    Set tpe to give tp and return this.

    Definition Classes
    Tree
  43. var symbol: Universe.Symbol

    Note that symbol is fixed as null at this level.

    Note that symbol is fixed as null at this level. In SymTrees, it is overridden and implemented with a var, initialized to NoSymbol.

    Trees which are not SymTrees but which carry symbols do so by overriding def symbol to forward it elsewhere. Examples:

    Super(qual, _) // has qual's symbol Apply(fun, args) // has fun's symbol TypeApply(fun, args) // has fun's symbol AppliedTypeTree(tpt, args) // has tpt's symbol TypeTree(tpe) // has tpe's typeSymbol, if tpe != null

    Attempting to set the symbol of a Tree which does not support it will induce an exception.

    Definition Classes
    SymTreeTree
  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  45. def tpe: Universe.Type

    Definition Classes
    Tree
  46. def tpe_=(t: Universe.Type): Unit

    Definition Classes
    Tree
  47. def tpt: Universe.Tree

    Definition Classes
    ValDefValOrDefDef
  48. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Serializable

Inherited from Serializable

Inherited from Universe.ValOrDefDef

Inherited from Universe.MemberDef

Inherited from Universe.DefTree

Inherited from Universe.SymTree

Inherited from Universe.Tree

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

No Group