environment.getJerseyResourceConfig().getSingletons()
returns a mutable Set<Object>
of all the resources and providers registered with Jersey. A simple iteration over this with an instanceOf
check should be enough.
The related method getProviderSingletons
won't work because it is returning a new set. And removing from that set won't remove from the original.