java.lang.management
Interface ClassLoadingMXBean


public interface ClassLoadingMXBean

Provides access to information about the class loading behaviour of the current invocation of the virtual machine. An instance of this bean is obtained by calling ManagementFactory.getClassLoadingMXBean().

Since:
1.5

Method Summary
 int getLoadedClassCount()
          Returns the number of classes currently loaded by the virtual machine.
 long getTotalLoadedClassCount()
          Returns the total number of classes loaded by the virtual machine since it was started.
 long getUnloadedClassCount()
          Returns the number of classes that have been unloaded by the virtual machine since it was started.
 boolean isVerbose()
          Returns true if the virtual machine will emit additional information when classes are loaded and unloaded.
 void setVerbose(boolean verbose)
          Turns on or off the emission of additional information when classes are loaded and unloaded.
 

Method Detail

getLoadedClassCount

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

Returns:
the number of loaded classes.

getTotalLoadedClassCount

long getTotalLoadedClassCount()
Returns the total number of classes loaded by the virtual machine since it was started. This is the sum of the currently loaded classes and those that have been unloaded.

Returns:
the total number of classes that have been loaded by the virtual machine since it started.

getUnloadedClassCount

long getUnloadedClassCount()
Returns the number of classes that have been unloaded by the virtual machine since it was started.

Returns:
the number of unloaded classes.

isVerbose

boolean isVerbose()
Returns true if the virtual machine will emit additional information when classes are loaded and unloaded. The format of the output is left up to the virtual machine.

Returns:
true if verbose class loading output is on.

setVerbose

void setVerbose(boolean verbose)
Turns on or off the emission of additional information when classes are loaded and unloaded. The format of the output is left up to the virtual machine. This method may be called by multiple threads concurrently, but there is only one global setting of verbosity that is affected.

Parameters:
verbose - the new setting for verbose class loading output.
Throws:
SecurityException - if a security manager exists and denies ManagementPermission("control").