It should be possible to take a QueryExp consisting only of standard JMX classes and produce a string from it that can be parsed to reconstruct the original QueryExp. This is particularly useful for JSR 160 (JMX Remote API) connectors based on text protocols such as SOAP. The client side of such a connector presents the MBeanServerConnection interface, including methods queryNames and queryMBeans. These methods are invoked with an object of type QueryExp. Most such objects are manufactured by static methods in the Query class, and are of non-public classes. So it is not possible to introspect the query portably in any way other than toString() or serialization. If the toString() of the standard QueryExp classes in the JMX RI were reversible, we could propose it as an informal standard to other implementors.