Package ghidra.program.model.lang
Class RegisterTree
java.lang.Object
ghidra.program.model.lang.RegisterTree
- All Implemented Interfaces:
- Comparable<RegisterTree>
The RegisterTree class builds and represents relationships between registers. Any
 register that "breaks down" into smaller registers can be represent by a 
 RegisterTree.  The largest register will be at the root and the registers that
 make it up will be its children trees.  The children are RegisterTrees as well
 and can have children trees of thier own.  The root of a RegisterTree may not
 have an associated Register which means that its children are unrelated.  This
 way all the registers of a processor can be represented as a single RegisterTree.
- 
Constructor SummaryConstructorsConstructorDescriptionRegisterTree(Register reg) RegisterTree(String name, Register[] regs) Constructs a RegisterTree with the given name and set of registersRegisterTree(String name, RegisterTree tree) Constructs a RegisterTree with one RegisterTree child
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(RegisterTree tree) Adds a Register Tree to this tree.intcompareTo(RegisterTree other) Get the RegisterTrees that are the children of this RegisterTreegetName()Returns the name of this register tree.Returns the parent RegisterTree.The parent path of this RegisterTree if it exists or null if this tree has no parent or no parent with a register.Returns the Register associated with this tree.The path of this register, which includes the parent path of this RegisterTree if this RegisterTree has a parent.getRegisterTree(Register register1) Returns the RegisterTree for the given register if one exists in this RegisterTree object.voidRemoves the register from the childrentoString()
- 
Constructor Details- 
RegisterTree
- 
RegisterTreeConstructs a RegisterTree with the given name and set of registers- Parameters:
- name- the name of the tree
- regs- the array of registers to form into a tree
 
- 
RegisterTreeConstructs a RegisterTree with one RegisterTree child- Parameters:
- name- the name of this tree
- tree- the child tree.
 
 
- 
- 
Method Details- 
getNameReturns the name of this register tree.
- 
addAdds a Register Tree to this tree.- Parameters:
- tree- the register tree to add
 
- 
getComponentsGet the RegisterTrees that are the children of this RegisterTree- Returns:
- a array of RegisterTrees
 
- 
getRegisterReturns the Register associated with this tree. This may be null which indicates the children RegisterTrees are unrelated to each other.
- 
getParentReturns the parent RegisterTree.
- 
getParentRegisterPathThe parent path of this RegisterTree if it exists or null if this tree has no parent or no parent with a register.- Returns:
- The parent path of this RegisterTree.
 
- 
getRegisterPathThe path of this register, which includes the parent path of this RegisterTree if this RegisterTree has a parent.- Returns:
- the path of this register.
 
- 
getRegisterTreeReturns the RegisterTree for the given register if one exists in this RegisterTree object.- Parameters:
- register1- The register for which to get a RegisterTree.
- Returns:
- The RegisterTree for the given register if one exists in this RegisterTree object.
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<RegisterTree>
- See Also:
 
- 
removeRemoves the register from the children- Parameters:
- reg- the register to remove.
 
- 
toString
 
-