Path: blob/master/src/jdk.jdi/share/classes/com/sun/jdi/ModuleReference.java
41159 views
/*1* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package com.sun.jdi;2627import com.sun.jdi.event.EventQueue;28import com.sun.jdi.event.VMDisconnectEvent;2930/**31* A module in the target VM.32* <p>33* Any method on {@code ModuleReference} which directly or indirectly takes34* {@code ModuleReference} as a parameter may throw {@link VMDisconnectedException}35* if the target VM is disconnected and the {@link VMDisconnectEvent} has been or is36* available to be read from the {@link EventQueue}.37* <p>38* Any method on {@code ModuleReference} which directly or indirectly takes39* {@code ModuleReference} as a parameter may throw {@link VMOutOfMemoryException}40* if the target VM has run out of memory.41* <p>42* Any method on {@code ModuleReference} or which directly or indirectly takes43* {@code ModuleReference} as a parameter may throw {@link InvalidModuleException}44* if the mirrored module has been unloaded.45*46* Not all target virtual machines support this class.47* Use {@link VirtualMachine#canGetModuleInfo()}48* to determine if the class is supported.49*50* @since 951*/52public interface ModuleReference extends ObjectReference {5354/**55* Returns the module name.56* This method returns {@code null}57* if this module is an unnamed module.58*59* @return the name of this module.60*/61String name();6263/**64* Returns the {@link ClassLoaderReference} object for this module.65*66* @return the {@link ClassLoaderReference} object for this module.67*/68ClassLoaderReference classLoader();69}707172