Class StacktraceModel.Fork
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.stacktrace.StacktraceModel.Fork
-
- Enclosing class:
- StacktraceModel
public class StacktraceModel.Fork extends java.lang.Object
A fork is a collection of branches that share a common parent branch. The fork also keeps track of which one of its branches is currently selected.This class might eventually be merged with the
StacktraceModel.Branch
class.
-
-
Field Summary
Fields Modifier and Type Field Description private StacktraceModel.Branch[]
branches
private int
itemOffset
private int
itemsInFork
private StacktraceModel.Branch
parentBranch
private java.lang.Integer
selectedBranchIndex
-
Constructor Summary
Constructors Modifier Constructor Description private
Fork(java.lang.Iterable<? extends IItem> items)
private
Fork(java.lang.Iterable<? extends IItem> items, int itemOffset, StacktraceModel.Branch parentBranch)
Create a fork by grouping items by distinct head frames using the frame separator.private
Fork(StacktraceModel.Branch parentBranch)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StacktraceModel.Branch
getBranch(int branchIndex)
int
getBranchCount()
StacktraceModel.Branch[]
getBranches()
StacktraceFrame[]
getFirstFrames()
int
getItemOffset()
int
getItemsInFork()
StacktraceModel.Branch
getParentBranch()
StacktraceModel.Branch
getSelectedBranch()
Deprecated.Will eventually be moved to UI codevoid
selectBranch(java.lang.Integer branchIndex)
Deprecated.Will eventually be moved to UI code
-
-
-
Field Detail
-
parentBranch
private final StacktraceModel.Branch parentBranch
-
branches
private final StacktraceModel.Branch[] branches
-
itemOffset
private final int itemOffset
-
itemsInFork
private final int itemsInFork
-
selectedBranchIndex
private java.lang.Integer selectedBranchIndex
-
-
Constructor Detail
-
Fork
private Fork(StacktraceModel.Branch parentBranch)
-
Fork
private Fork(java.lang.Iterable<? extends IItem> items)
-
Fork
private Fork(java.lang.Iterable<? extends IItem> items, int itemOffset, StacktraceModel.Branch parentBranch)
Create a fork by grouping items by distinct head frames using the frame separator. If a parent branch is specified, then look for head frames after the parent branch.
-
-
Method Detail
-
getItemOffset
public int getItemOffset()
-
getItemsInFork
public int getItemsInFork()
-
getParentBranch
public StacktraceModel.Branch getParentBranch()
-
getBranchCount
public int getBranchCount()
-
getSelectedBranch
@Deprecated public StacktraceModel.Branch getSelectedBranch()
Deprecated.Will eventually be moved to UI code
-
getBranch
public StacktraceModel.Branch getBranch(int branchIndex)
-
getBranches
public StacktraceModel.Branch[] getBranches()
-
getFirstFrames
public StacktraceFrame[] getFirstFrames()
- Returns:
- the first frame of each child branch to this fork
-
selectBranch
@Deprecated public void selectBranch(java.lang.Integer branchIndex)
Deprecated.Will eventually be moved to UI codeSelect a child branch by its index.- Parameters:
branchIndex
- Index of branch to select. If null, then selection will be cleared.
-
-