case class YPartBranch(node: YPart, position: Position, stack: Seq[YPart], strict: Boolean) extends ASTPartBranch with Product with Serializable
Represents a branch in the YAML AST with position context and navigation stack.
Responsibility
This case class wraps a YPart node with its position context and ancestor stack,
providing rich navigation and query capabilities. It handles:
- Determining if the current position is at a key, value, or array element
- Accessing parent entries, maps, and ancestor nodes
- Querying node properties (isMultiline, isEmptyNode, isAtRoot, etc.)
- Finding siblings and array elements
- Extracting key paths and string values
Stack Navigation
The stack parameter contains ancestor nodes from innermost to outermost,
enabling efficient parent/ancestor lookups without re-traversing the AST.
Related Classes
- NodeBranchBuilder - Factory for building YPartBranch instances from positions
- org.mulesoft.als.common.YamlUtils - Simpler position-based navigation without stack
- org.mulesoft.als.common.ASTElementWrapper - Implicit extensions for containment checks
- node
The current YPart node at the position
- position
The cursor/document position (1-indexed, AMF format)
- stack
Ancestor nodes from innermost to outermost
- strict
Whether to use strict containment checks (for flow structures)
- Alphabetic
- By Inheritance
- YPartBranch
- Serializable
- Serializable
- Product
- Equals
- ASTPartBranch
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
YPartBranch(node: YPart, position: Position, stack: Seq[YPart], strict: Boolean)
- node
The current YPart node at the position
- position
The cursor/document position (1-indexed, AMF format)
- stack
Ancestor nodes from innermost to outermost
- strict
Whether to use strict containment checks (for flow structures)
Type Members
-
type
T = YPart
- Definition Classes
- YPartBranch → ASTPartBranch
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def arraySiblings: Seq[String]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
lazy val
closestEntry: Option[YMapEntry]
does not ignore the current entry
does not ignore the current entry
- Definition Classes
- YPartBranch → ASTPartBranch
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
findFirstOf[Element <: T](clazz: Class[Element], l: Seq[T]): Option[Element]
- Attributes
- protected
- Definition Classes
- ASTPartBranch
- Annotations
- @tailrec()
-
def
getAncestor(l: Int): Option[T]
- Definition Classes
- ASTPartBranch
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getMark: Option[ScalarMark]
- lazy val hasIncludeTag: Boolean
-
val
isArray: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
val
isAtRoot: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
val
isEmptyNode: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
lazy val
isInArray: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
def
isInBranchOf(key: String): Boolean
- Definition Classes
- ASTPartBranch
- lazy val isIncludeTagValue: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
isKey: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
def
isKeyDescendantOf(key: String): Boolean
- Definition Classes
- ASTPartBranch
-
lazy val
isKeyLike: Boolean
- Definition Classes
- ASTPartBranch
-
lazy val
isMultiline: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
lazy val
isPlainText: Option[Boolean]
isPlainText means it is a scalar and has no quotation marks
-
val
isPositionOutsideLastEndNode: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
val
isValue: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
def
isValueDescendanceOf(key: String): Boolean
- Definition Classes
- ASTPartBranch
- def isValueDescendantOf(key: String): Boolean
-
def
keys: Seq[String]
- Definition Classes
- YPartBranch → ASTPartBranch
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
node: YPart
- Definition Classes
- YPartBranch → ASTPartBranch
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
val
parent: Option[T]
- Definition Classes
- ASTPartBranch
-
lazy val
parentEntry: Option[YMapEntry]
ignores current entry
-
def
parentEntryIs(key: String): Boolean
- Definition Classes
- ASTPartBranch
-
def
parentKey: Option[String]
- Definition Classes
- YPartBranch → ASTPartBranch
- lazy val parentMap: Option[YMap]
-
val
position: Position
- Definition Classes
- YPartBranch → ASTPartBranch
-
def
siblingKeys: Set[String]
- Definition Classes
- ASTPartBranch
-
def
siblings: Seq[YPart]
- Definition Classes
- YPartBranch → ASTPartBranch
-
val
stack: Seq[YPart]
- Definition Classes
- YPartBranch → ASTPartBranch
-
val
strict: Boolean
- Definition Classes
- YPartBranch → ASTPartBranch
-
lazy val
stringValue: String
- Definition Classes
- YPartBranch → ASTPartBranch
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- lazy val tag: Option[YTag]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated