In my opinion, what it is doing is correct.
The format of the statistics is determined by the statistics formatter.
Which by default returns a String, but it could return anything.
A collection of JBossSubPoolStatistics would be the most obvious alternative
which would map to a collection of composite types for the same.
You need to be able handle the return type dynamically,
Its called polymorphism which is an integral part of any object orientated language.
i.e. MetaValue returnValue = invoke(...)
MetaType type = returnValue.getMetaType();
If you can't handle that, then I'd suggest we add a new method which hardwires the String formatter
with a String return type and only annotate that as a ManagedOperation.
But this issue will come up elsewhere where the return type cannot be constrained so easily.