To add an object to the tree, invoke the addChild method of the object's parent object. In the invocation of the addChild method, pass the TreeNode object that you are adding as a parameter.
The parent object depends on whether the object represents an add-on component or a statistic:
If the object represents an add-on component, the parent is the server node object.
If the object represents a statistic, the parent is the TreeNode object that represents the add-on component.