001/*
002 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 *  This file is licensed to You under the Eclipse Public License (EPL);
005 *  You may not use this file except in compliance with the License. You
006 *  may obtain a copy of the License at
007 *
008 *      http://www.opensource.org/licenses/eclipse-1.0.php
009 *
010 *  See the COPYRIGHT.txt file distributed with this work for information
011 *  regarding copyright ownership.
012 */
013package gnu.java.lang.management;
014
015import org.jikesrvm.classloader.JMXSupport;
016
017final class VMClassLoadingMXBeanImpl {
018
019  /**
020   * @return count of number of classes currently loaded
021   */
022  static int getLoadedClassCount() {
023    return JMXSupport.getLoadedClassCount();
024  }
025
026  /**
027   * @return count of number of classes ever unloaded
028   */
029  static long getUnloadedClassCount() {
030    return JMXSupport.getUnloadedClassCount();
031  }
032
033  /**
034   * @return true if verbose class loading is on.
035   */
036  static boolean isVerbose() {
037    return JMXSupport.isVerbose();
038  }
039
040  /**
041   * Turns verbose class loading on or off.
042   *
043   * @param verbose {@code true} if verbose information should
044   *  be emitted on class loading.
045   */
046  static void setVerbose(boolean verbose) {
047    JMXSupport.setVerbose(verbose);
048  }
049
050}