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 other than that of the
node to which it is applied. 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.
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)
.
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 traversables
(GenTraversable[_]
) and optional children (Option[_]
).
In the case of traversables and options, their contents are processed and
any immediate Attributable contents are included in the sequence.
This node's first attributable child.
This node's first attributable child. Raises an IndexOutOfBounds exception if this node has no children
If this node has some attributable children then return true, else return false.
The index of this node as a child of its parent or -1 if this node has no parent (is root).
Is this node the first child of its parent?
Is this node the last child of its parent?
Is this node the root of the hierarchy?
This node's last attributable child.
This node's last attributable child. Raises an IndexOutOfBounds exception if this node has no children
A link to the child of the same Attributable parent immediately to the right of this one, or null if this is the last child of its parent.
A short-hand for parent.
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 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, such as Option
or
GenTraversable
nodes.
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.
House-keeping method to connect my children to me and their siblings.
House-keeping method to connect my children to me and their siblings.
If a node is a direct child of a GenTraversable
or Some
,
then the parent link "bypasses" that parent to go to the Attributable
parent above. It is assumed that traversables and options are not directly nested.
As a side-effect, this method remembers the attributable children
so that they can be accessed easily via the children iterator.
use productIterator instead
Common functionality for all classes that are to be attributed. This trait must be extended by all classes for which the node properties such as parent and the attribute shorthand notation
->
are desired.