question: private Set < ObjectName > objectNamesFromFilteredNamedObjects ( Set < NamedObject > list , QueryExp query ) { Set < ObjectName > result = new HashSet < ObjectName > ( ) ; if ( query == null ) { for ( NamedObject no : list ) { result . add ( no . getName ( ) ) ; } } else { final MBeanServer oldServer = QueryEval . getMBeanServer ( ) ; query . setMBeanServer ( server ) ; try { for ( NamedObject no : list ) { boolean res ; try { res = query . apply ( no . getName ( ) ) ; } catch ( Exception e ) { res = false ; } if ( res ) { result . add ( no . getName ( ) ) ; } } } finally { query . setMBeanServer ( oldServer ) ; } } return result ; }
target:  Applies the specified queries to the set of NamedObjects.