org.kiama.attribution

Attributable

trait Attributable extends Product with Cloneable

Common functionality for classes whose instances are to be attributed.

This trait must be extended by all classes for which the node properties such as parent or the attribute shorthand notation -> are desired. Also provides deep and shallow cloning support.

Source
Attributable.scala
Linear Supertypes
Cloneable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Attributable
  2. Cloneable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
Visibility
  1. Public
  2. All

Abstract Value Members

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

    Definition Classes
    Equals
  2. abstract def productArity: Int

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

    Definition Classes
    Product

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 ->[T, U](a: (T) ⇒ U)(implicit b: (Attributable.this.type) ⇒ T): U

    Reference an attribute or function that can be applied to this node.

    Reference an attribute or function that can be applied to this node. this->attribute is equivalent to attribute(this). The attribute definition is defined on a type T other than that of the node to which it is applied (this.type). An implicit value must exist to transform from the node type to the type expected by the attribute. This form of attribute reference is commonly used to implement attribute forwarding where the implicit parameter enables references to the attribute to be implicitly forwarded to some other node.

    Annotations
    @inline()
  5. final def ->[U](a: (Attributable.this.type) ⇒ U): U

    Reference an attribute or function that can be applied to this node.

    Reference an attribute or function that can be applied to this node. this->attribute is equivalent to attribute(this).

    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

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

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

    Definition Classes
    Any
  9. def children: Iterator[Attributable]

    This node's Attributable children in left-to-right order.

    This node's Attributable children in left-to-right order. Children that are not Attributable are ignored, except for nodes that collect Attributable children. Those indirect children are also collected here.

    See also

    initTreeProperties

  10. def clone(): Attributable

    Make a shallow clone of this node.

    Make a shallow clone of this node.

    Definition Classes
    Attributable → AnyRef
    See also

    Attributable.deepclone

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

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

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. def firstChild[T]: T

    This node's first Attributable child.

    This node's first Attributable child. Raises an IndexOutOfBounds exception if this node has no such children.

  15. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  16. def hasChildren: Boolean

    Does this node have some Attributable children?

  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. var index: Int

    The index of this node as a child of its parent or -1 if this node has no parent (i.

    The index of this node as a child of its parent or -1 if this node has no parent (i.e., it's a root).

  19. def initTreeProperties(): Unit

    House-keeping method to connect this node's children to it and their siblings (and recursively through the subtree rooted here).

    House-keeping method to connect this node's children to it and their siblings (and recursively through the subtree rooted here). The easy case is Attributable children that are direct descendants. Also connected are Attributable descendants that are reachable via a path of descendants that only passes through GenTraversable, Some, or tuple (up to size four) nodes. Thus, descendants of these kinds are regarded as children for the purposes of attribution. As a side-effect, this method remembers the children so that they can be accessed easily via the children iterator.

  20. def isFirst: Boolean

    Is this node the first child of its parent?

  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. def isLast: Boolean

    Is this node the last child of its parent?

  23. def isRoot: Boolean

    Is this node the root of the hierarchy?

  24. def lastChild[T]: T

    This node's last Attributable child.

    This node's last Attributable child. Raises an IndexOutOfBounds exception if this node has no such children.

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

    Definition Classes
    AnyRef
  26. def next[T]: T

    A short-hand for next.asInstanceOf[T], which is useful in cases a T-specific operation is applied to the next, which otherwise would be of type Attributable.

  27. var next: Attributable

    A link to the child of the same Attributable parent immediately to the left of this one, or null if this is the first child of its parent.

  28. final def notify(): Unit

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

    Definition Classes
    AnyRef
  30. def parent[T]: T

    A short-hand for parent.asInstanceOf[T], which is useful in cases a T-specific operation is applied to the parent, which otherwise would be of type Attributable.

  31. var parent: Attributable

    A link to the parent Attributable node of this node or null if this node has no parent.

    A link to the parent Attributable node of this node or null if this node has no parent. Note that this link will skip intervening non-Attributable ancestors.

    See also

    initTreeProperties

  32. def prev[T]: T

    A short-hand for prev.asInstanceOf[T], which is useful in cases a T-specific operation is applied to the prev, which otherwise would be of type Attributable.

  33. var prev: Attributable

    A link to the child of the same Attributable parent immediately to the left of this one, or null if this is the first child of its parent.

  34. def productIterator: Iterator[Any]

    Definition Classes
    Product
  35. def productPrefix: String

    Definition Classes
    Product
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  37. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def productElements: Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) use productIterator instead

Inherited from Cloneable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any