public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans ()

Returns a list of GarbageCollectorMXBean objects in the Java virtual machine. The Java virtual machine may have one or more GarbageCollectorMXBean objects. It may add or remove GarbageCollectorMXBean during execution.

Returns:  a list of GarbageCollectorMXBean objects.