0N/A/*
2362N/A * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.lang.management;
0N/A
0N/A/**
0N/A * The management interface for the class loading system of
0N/A * the Java virtual machine.
0N/A *
0N/A * <p> A Java virtual machine has a single instance of the implementation
0N/A * class of this interface. This instance implementing this interface is
0N/A * an <a href="ManagementFactory.html#MXBean">MXBean</a>
0N/A * that can be obtained by calling
0N/A * the {@link ManagementFactory#getClassLoadingMXBean} method or
0N/A * from the {@link ManagementFactory#getPlatformMBeanServer
178N/A * platform <tt>MBeanServer</tt>}.
0N/A *
0N/A * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
0N/A * the class loading system within an <tt>MBeanServer</tt> is:
0N/A * <blockquote>
0N/A * {@link ManagementFactory#CLASS_LOADING_MXBEAN_NAME
0N/A * <tt>java.lang:type=ClassLoading</tt>}
0N/A * </blockquote>
0N/A *
178N/A * It can be obtained by calling the
178N/A * {@link PlatformManagedObject#getObjectName} method.
178N/A *
178N/A * @see ManagementFactory#getPlatformMXBeans(Class)
0N/A * @see <a href="../../../javax/management/package-summary.html">
0N/A * JMX Specification.</a>
0N/A * @see <a href="package-summary.html#examples">
0N/A * Ways to Access MXBeans</a>
0N/A *
0N/A * @author Mandy Chung
0N/A * @since 1.5
0N/A */
178N/Apublic interface ClassLoadingMXBean extends PlatformManagedObject {
0N/A
0N/A /**
0N/A * Returns the total number of classes that have been loaded since
0N/A * the Java virtual machine has started execution.
0N/A *
0N/A * @return the total number of classes loaded.
0N/A *
0N/A */
0N/A public long getTotalLoadedClassCount();
0N/A
0N/A /**
0N/A * Returns the number of classes that are currently loaded in the
0N/A * Java virtual machine.
0N/A *
0N/A * @return the number of currently loaded classes.
0N/A */
0N/A public int getLoadedClassCount();
0N/A
0N/A /**
0N/A * Returns the total number of classes unloaded since the Java virtual machine
0N/A * has started execution.
0N/A *
0N/A * @return the total number of unloaded classes.
0N/A */
0N/A public long getUnloadedClassCount();
0N/A
0N/A /**
0N/A * Tests if the verbose output for the class loading system is enabled.
0N/A *
0N/A * @return <tt>true</tt> if the verbose output for the class loading
0N/A * system is enabled; <tt>false</tt> otherwise.
0N/A */
0N/A public boolean isVerbose();
0N/A
0N/A /**
0N/A * Enables or disables the verbose output for the class loading
0N/A * system. The verbose output information and the output stream
0N/A * to which the verbose information is emitted are implementation
0N/A * dependent. Typically, a Java virtual machine implementation
0N/A * prints a message each time a class file is loaded.
0N/A *
0N/A * <p>This method can be called by multiple threads concurrently.
0N/A * Each invocation of this method enables or disables the verbose
0N/A * output globally.
0N/A *
0N/A * @param value <tt>true</tt> to enable the verbose output;
0N/A * <tt>false</tt> to disable.
0N/A *
0N/A * @exception java.lang.SecurityException if a security manager
0N/A * exists and the caller does not have
0N/A * ManagementPermission("control").
0N/A */
0N/A public void setVerbose(boolean value);
0N/A
0N/A}