Class CCAbstractTreeItem
java.lang.Object
com.ibm.debug.pdt.codecoverage.core.results.CCAbstractItem
com.ibm.debug.pdt.codecoverage.core.results.CCAbstractTreeItem
- All Implemented Interfaces:
ICCBase,ICCTreeItem
- Direct Known Subclasses:
CCEmptyResult
Base implementation of a CC item that is part of a tree hierarchy
- Since:
- 4.0
-
Field Summary
FieldsFields inherited from class com.ibm.debug.pdt.codecoverage.core.results.CCAbstractItem
TEMPPROP -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddChild(ICCTreeItem child) Add a single child to this item The added child will have this item as its parentvoidaddChildren(ICCTreeItem[] children) Add array of children to this item The added children will have this item as their parent if it is important to know if an item already exists then useICCTreeItem.addChild(ICCTreeItem)booleanGiven a name return the matching child The current implementation only supports unique namesReturns an array (could be an empty array) of children New in v9 calls to this method will return child items in an order as determined by the items themselves<T extends ICCTreeItem>
T[]getChildren(T[] array) Helper method to get array of items on the requested typeintReturns the number of childrenReturns the parent or null if it is a root itemReturns a qualified name can be used to uniquely identify an object.final StringgetUUID()Returns a globally unique id (UUID) If one does not exist in the result, a call toICCTreeItem.getUniqueID()will be done to produce a unique reproducible stringinthashCode()booleanisRoot()Returns true if this is a root item with no parentvoidrefresh()Refreshes the children to ensure the sort order is correctvoidsetChildName(ICCTreeItem child, String oldName, String newName) Helper method to update any internal references to a child's name that may require update when a child's name is changed.voidSet the name of this artifact In version 10.1 this became part of the APIvoidsetParent(ICCTreeItem parent) Sets the parent of this item This item will become a child of the parentvoidSets the unique id for this tree item When possible this should be a UUID format.Methods inherited from class com.ibm.debug.pdt.codecoverage.core.results.CCAbstractItem
addEncodedMessage, addMessage, addMessage, getDecodedMessages, getDecodedMessages, getID, getMessages, getName, getProperties, getProperty, getProperty, isMessage, isProperty, setProperty, updatePropertyMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCBase
addEncodedMessage, addMessage, addMessage, getDecodedMessages, getDecodedMessages, getID, getMessages, getName, getProperties, getProperty, getProperty, isMessage, isProperty, setProperty, updatePropertyMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCTreeItem
getUniqueID, supportsUUID
-
Field Details
-
UUID_ATTR
- See Also:
-
TEMP_UUID
- See Also:
-
-
Method Details
-
getResult
- Returns:
- the result
- Since:
- 9.0
-
getParent
Description copied from interface:ICCTreeItemReturns the parent or null if it is a root item- Specified by:
getParentin interfaceICCTreeItem- Returns:
- parent or null
-
setParent
Description copied from interface:ICCTreeItemSets the parent of this item This item will become a child of the parent- Specified by:
setParentin interfaceICCTreeItem- Parameters:
parent- this artifact's parent
-
isRoot
public boolean isRoot()Description copied from interface:ICCTreeItemReturns true if this is a root item with no parent- Specified by:
isRootin interfaceICCTreeItem- Returns:
- true if it has no parent and therefore is a root item
-
getChildren
Description copied from interface:ICCTreeItemReturns an array (could be an empty array) of children New in v9 calls to this method will return child items in an order as determined by the items themselves- Specified by:
getChildrenin interfaceICCTreeItem- Returns:
- array of children or an empty array
-
getChildren
Helper method to get array of items on the requested type- Type Parameters:
T- type or return array- Parameters:
array- pre-allocated array of the type required- Returns:
- an array of children of type T
- Since:
- 6.0
-
addChild
Description copied from interface:ICCTreeItemAdd a single child to this item The added child will have this item as its parent- Specified by:
addChildin interfaceICCTreeItem- Parameters:
child- child to be added- Returns:
- true if added
-
addChildren
Description copied from interface:ICCTreeItemAdd array of children to this item The added children will have this item as their parent if it is important to know if an item already exists then useICCTreeItem.addChild(ICCTreeItem)- Specified by:
addChildrenin interfaceICCTreeItem- Parameters:
children- array of children to be added
-
getChild
Description copied from interface:ICCTreeItemGiven a name return the matching child The current implementation only supports unique names- Specified by:
getChildin interfaceICCTreeItem- Parameters:
name- child's name to retrieve- Returns:
- null or the child
-
getNumChildren
public int getNumChildren()Description copied from interface:ICCTreeItemReturns the number of children- Specified by:
getNumChildrenin interfaceICCTreeItem- Returns:
- number of children
-
getQualifiedName
Description copied from interface:ICCTreeItemReturns a qualified name can be used to uniquely identify an object.- Specified by:
getQualifiedNamein interfaceICCTreeItem- Returns:
- qualified name
-
hashCode
public int hashCode() -
equals
-
refresh
public void refresh()Description copied from interface:ICCTreeItemRefreshes the children to ensure the sort order is correct- Specified by:
refreshin interfaceICCTreeItem
-
getUUID
Description copied from interface:ICCTreeItemReturns a globally unique id (UUID) If one does not exist in the result, a call toICCTreeItem.getUniqueID()will be done to produce a unique reproducible string- Specified by:
getUUIDin interfaceICCTreeItem- Returns:
- UUID or null
-
setUUID
Description copied from interface:ICCTreeItemSets the unique id for this tree item When possible this should be a UUID format.- Specified by:
setUUIDin interfaceICCTreeItem- Parameters:
uniqueID- UUID or a globally unique identifier
-
setChildName
Helper method to update any internal references to a child's name that may require update when a child's name is changed. This is not part of the interface- Parameters:
child- that will be renamedoldName- current namenewName- new name
-
setName
Description copied from class:CCAbstractItemSet the name of this artifact In version 10.1 this became part of the API- Specified by:
setNamein interfaceICCBase- Overrides:
setNamein classCCAbstractItem- Parameters:
name- new name for this artifact
-