use of com.google.security.zynamics.binnavi.disassembly.types.BaseTypeCategory in project binnavi by google.
the class ViewReferencesTableModel method addTypeSubstitutionToTree.
/**
* Adds a {@link TypeSubstitution type substitution} for the given {@link INaviInstruction
* instruction} to the tree.
*
* @param operandNode The {@link INaviOperandTreeNode operand node} which holds the
* {@link TypeSubstitution type substitution}.
* @param instruction The {@link INaviInstruction instruction} which holds the
* {@link INaviOperandTreeNode operand node}.
*/
private void addTypeSubstitutionToTree(final INaviOperandTreeNode operandNode, final INaviInstruction instruction) {
final TypeSubstitution typeSubstitution = operandNode.getTypeSubstitution();
final BaseTypeCategory category = typeSubstitution.getBaseType().getCategory();
if (category == BaseTypeCategory.STRUCT || category == BaseTypeCategory.ARRAY || category == BaseTypeCategory.UNION) {
addCompoundTypeSubstitutionToTree(operandNode, instruction, typeSubstitution);
} else {
addBaseType(typeSubstitution.getBaseType());
BaseTypeTreeNode currentNode = baseTypeToTreeNode.get(typeSubstitution.getBaseType());
insertNodeInto(multiIndex.putTypeSubstitution(typeSubstitution, instruction), currentNode, currentNode.getChildCount());
}
}
Aggregations