return name;
}
@Override public void contribute(Dump dump) throws DumpContributionFailedException {
if (heapDumpMethod == null) {
throw new DumpContributionFailedException(getName(), "Heap dump not enalbed on this JVM");
}
try {
heapDumpMethod.invoke(diagnosticMBean, dump.createFile("heap.hprof").getAbsolutePath(), true);
} catch (Exception e) {
throw new DumpContributionFailedException(getName(), "Failed to generate heap dump", e);
}
}