0N/A/*
2362N/A * Copyright (c) 1998, 2004, 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 com.sun.jdi;
0N/A
0N/Aimport java.util.List;
0N/A
0N/A/**
0N/A * A class loader object from the target VM.
0N/A * A ClassLoaderReference is an {@link ObjectReference} with additional
0N/A * access to classloader-specific information from the target VM. Instances
0N/A * ClassLoaderReference are obtained through calls to
0N/A * {@link ReferenceType#classLoader}
0N/A *
0N/A * @see ObjectReference
0N/A *
0N/A * @author Gordon Hirsch
0N/A * @since 1.3
0N/A */
0N/Apublic interface ClassLoaderReference extends ObjectReference {
0N/A
0N/A /**
0N/A * Returns a list of all loaded classes that were defined by this
0N/A * class loader. No ordering of this list guaranteed.
0N/A * <P>
0N/A * The returned list will include reference types
0N/A * loaded at least to the point of preparation and
0N/A * types (like array) for which preparation is
0N/A * not defined.
0N/A *
0N/A * @return a List of {@link ReferenceType} objects mirroring types
0N/A * loaded by this class loader. The list has length 0 if no types
0N/A * have been defined by this classloader.
0N/A */
0N/A List<ReferenceType> definedClasses();
0N/A
0N/A /**
0N/A * Returns a list of all classes for which this class loader has
0N/A * been recorded as the initiating loader in the target VM.
0N/A * The list contains ReferenceTypes defined directly by this loader
0N/A * (as returned by {@link #definedClasses}) and any types for which
0N/A * loading was delegated by this class loader to another class loader.
0N/A * <p>
0N/A * The visible class list has useful properties with respect to
0N/A * the type namespace. A particular type name will occur at most
0N/A * once in the list. Each field or variable declared with that
0N/A * type name in a class defined by
0N/A * this class loader must be resolved to that single type.
0N/A * <p>
0N/A * No ordering of the returned list is guaranteed.
0N/A * <p>
4008N/A * See
4008N/A * <cite>The Java&trade; Virtual Machine Specification</cite>,
4008N/A * section 5.3 - Creation and Loading
0N/A * for more information on the initiating classloader.
0N/A * <p>
0N/A * Note that unlike {@link #definedClasses()}
0N/A * and {@link VirtualMachine#allClasses()},
0N/A * some of the returned reference types may not be prepared.
0N/A * Attempts to perform some operations on unprepared reference types
0N/A * (e.g. {@link ReferenceType#fields() fields()}) will throw
0N/A * a {@link ClassNotPreparedException}.
0N/A * Use {@link ReferenceType#isPrepared()} to determine if
0N/A * a reference type is prepared.
0N/A *
0N/A * @return a List of {@link ReferenceType} objects mirroring classes
0N/A * initiated by this class loader. The list has length 0 if no classes
0N/A * are visible to this classloader.
0N/A */
0N/A List<ReferenceType> visibleClasses();
0N/A}