Interface ClassLoadingMXBean

All Superinterfaces:
PlatformManagedObject

public interface ClassLoadingMXBean extends PlatformManagedObject
The management and monitoring interface for the virtual machine's class loading functionality.

Precisely one instance of this interface will be made available to management clients.

Accessing this MXBean can be done in one of three ways.

  1. Invoking the static ManagementFactory.getClassLoadingMXBean() method.
  2. Using a javax.management.MBeanServerConnection.
  3. Obtaining a proxy MXBean from the static ManagementFactory.newPlatformMXBeanProxy(MBeanServerConnection connection, String mxbeanName, Class<T> mxbeanInterface()) method, passing in "java.lang:type=ClassLoading" for the value of the mxbeanName parameter.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of classes currently loaded by the virtual machine.
    long
    Returns a figure for the total number of classes that have been loaded by the virtual machine during its lifetime.
    long
    Returns a figure for the total number of classes that have been unloaded by the virtual machine over its lifetime.
    boolean
    Returns a boolean indication of whether the virtual machine's class loading system is producing verbose output.
    void
    setVerbose(boolean value)
    Updates the virtual machine's class loading system to operate in verbose or non-verbose mode.

    Methods declared in interface java.lang.management.PlatformManagedObject

    getObjectName
  • Method Details

    • getLoadedClassCount

      int getLoadedClassCount()
      Returns the number of classes currently loaded by the virtual machine.
      Returns:
      the number of loaded classes
    • getTotalLoadedClassCount

      long getTotalLoadedClassCount()
      Returns a figure for the total number of classes that have been loaded by the virtual machine during its lifetime.
      Returns:
      the total number of classes that have been loaded
    • getUnloadedClassCount

      long getUnloadedClassCount()
      Returns a figure for the total number of classes that have been unloaded by the virtual machine over its lifetime.
      Returns:
      the total number of unloaded classes
    • isVerbose

      boolean isVerbose()
      Returns a boolean indication of whether the virtual machine's class loading system is producing verbose output.
      Returns:
      true if running in verbose mode
    • setVerbose

      void setVerbose(boolean value)
      Updates the virtual machine's class loading system to operate in verbose or non-verbose mode.
      Parameters:
      value - true to put the class loading system into verbose mode, false to take the class loading system out of verbose mode.