private Set < JmxTreeNode > getMatchingChildren ( String nameFilter , ObjectNode objectNode ) { AttributesNode attributesNode = null ; OperationsNode operationsNode = null ; NotificationsNode notificationsNode = null ; Set < JmxTreeNode > objectChildren = new TreeSet < JmxTreeNode > ( ) ; for ( JmxTreeNode child : objectNode . getChildren ( ) ) { if ( child instanceof AttributesNode ) { Set < AttributeNode > attributes = getMatchingAttributes ( ( AttributesNode ) child , nameFilter ) ; if ( ! attributes . isEmpty ( ) ) { attributesNode = new AttributesNode ( ObjectNode . LABEL_ATTRIBUTES , attributes ) ; } } else if ( child instanceof OperationsNode ) { Set < OperationNode > operations = getMatchingOperations ( ( OperationsNode ) child , nameFilter ) ; if ( ! operations . isEmpty ( ) ) { operationsNode = new OperationsNode ( ObjectNode . LABEL_OPERATIONS , operations ) ; } } else if ( child instanceof NotificationsNode ) { Set < NotificationNode > notifications = getMatchingNotifications ( ( NotificationsNode ) child , nameFilter ) ; if ( ! notifications . isEmpty ( ) ) { notificationsNode = new NotificationsNode ( ObjectNode . LABEL_NOTIFICATIONS , notifications ) ; } } } if ( attributesNode != null ) { objectChildren . add ( attributesNode ) ; } if ( operationsNode != null ) { objectChildren . add ( operationsNode ) ; } if ( notificationsNode != null ) { objectChildren . add ( notificationsNode ) ; } return objectChildren ; }
Returns the matching child nodes of a ManagedObject .