Class StacktraceModel.Branch
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.stacktrace.StacktraceModel.Branch
-
- Enclosing class:
- StacktraceModel
public class StacktraceModel.Branch extends java.lang.ObjectA branch is a sequence of frames without any forks. It is preceded by aStacktraceModel.Forkand ends with a fork.When first constructed, the branch only has the first frame calculated. On demand, a list of non-branching "tail" frames and a fork after the branch can be calculated and retrieved.
Note that all frames within a branch do not necessarily have the same number of items. Stack traces that are similar in all aspects except for their sizes (e.g. [a, b] and [a, b, c]) can share a branch. Forks are only created if there are two or more different frames on the same level (e.g. [a, b, c] and [a, b, d]).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StacktraceModel.ForkgetEndFork()StacktraceFramegetFirstFrame()intgetItemOffsetInFork()StacktraceFramegetLastFrame()StacktraceModel.ForkgetParentFork()StacktraceFrame[]getTailFrames()booleanhasTail()StacktraceModel.BranchselectSibling(java.lang.Integer siblingOffset)Deprecated.Will eventually be moved to UI code
-
-
-
Method Detail
-
getItemOffsetInFork
public int getItemOffsetInFork()
-
getParentFork
public StacktraceModel.Fork getParentFork()
-
hasTail
public boolean hasTail()
-
selectSibling
@Deprecated public StacktraceModel.Branch selectSibling(java.lang.Integer siblingOffset)
Deprecated.Will eventually be moved to UI codeSelect a sibling branch. This sets the selection state on the parent forks.- Parameters:
siblingOffset- Use 1 or -1 to select the next or previous sibling branch. If 0, then this branch is selected. If null, clear branch selection.- Returns:
- The newly selected branch. Null if branch selection was cleared.
-
getFirstFrame
public StacktraceFrame getFirstFrame()
-
getLastFrame
public StacktraceFrame getLastFrame()
- Returns:
- The last frame in this branch. If the branch length is 1, then this will be equal to the first frame.
-
getTailFrames
public StacktraceFrame[] getTailFrames()
- Returns:
- Get non-branching tail frames in this branch. If you are building a UI where you are not interested in non-branching frames, then you may want to ignore the tail.
-
getEndFork
public StacktraceModel.Fork getEndFork()
- Returns:
- the fork with branches following this branch
-
-