< prev index next >

src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java

Print this page
rev 58770 : [mq]: svc-spec-update
   1 /*
   2  * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 116      * Returns the loaded reference types that
 117      * match a given name. The name must be fully qualified
 118      * (for example, java.lang.String). The returned list
 119      * will contain a {@link ReferenceType} for each class
 120      * or interface found with the given name. The search
 121      * is confined to loaded classes only; no attempt is made
 122      * to load a class of the given name.
 123      * <P>
 124      * The returned list will include reference types
 125      * loaded at least to the point of preparation and
 126      * types (like array) for which preparation is
 127      * not defined.
 128      *
 129      * @param className the class/interface name to search for
 130      * @return a list of {@link ReferenceType} objects, each
 131      * mirroring a type in the target VM with the given name.
 132      */
 133     List<ReferenceType> classesByName(String className);
 134 
 135     /**
 136      * Returns all loaded types. For each loaded type in the target
 137      * VM a {@link ReferenceType} will be placed in the returned list.
 138      * The list will include ReferenceTypes which mirror classes,
 139      * interfaces, and array types.
 140      * <P>
 141      * The returned list will include reference types
 142      * loaded at least to the point of preparation and
 143      * types (like array) for which preparation is
 144      * not defined.











 145      *
 146      * @return a list of {@link ReferenceType} objects, each mirroring
 147      * a loaded type in the target VM.

 148      */
 149     List<ReferenceType> allClasses();
 150 
 151     /**
 152      * All classes given are redefined according to the
 153      * definitions supplied.  A method in a redefined class
 154      * is called 'equivalent' (to the old version of the
 155      * method) if
 156      * <UL>
 157      * <LI>their bytecodes are the same except for indicies into
 158      *   the constant pool, and
 159      * <LI>the referenced constants are equal.
 160      * </UL>
 161      * Otherwise, the new method is called 'non-equivalent'.
 162      * If a redefined method has active stack frames, those active
 163      * frames continue to run the bytecodes of the previous version of the
 164      * method.  If the new version of such a method is non-equivalent,
 165      * then a method from one of these active frames is called 'obsolete' and
 166      * {@link Method#isObsolete Method.isObsolete()}
 167      * will return true when called on one of these methods.


   1 /*
   2  * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 116      * Returns the loaded reference types that
 117      * match a given name. The name must be fully qualified
 118      * (for example, java.lang.String). The returned list
 119      * will contain a {@link ReferenceType} for each class
 120      * or interface found with the given name. The search
 121      * is confined to loaded classes only; no attempt is made
 122      * to load a class of the given name.
 123      * <P>
 124      * The returned list will include reference types
 125      * loaded at least to the point of preparation and
 126      * types (like array) for which preparation is
 127      * not defined.
 128      *
 129      * @param className the class/interface name to search for
 130      * @return a list of {@link ReferenceType} objects, each
 131      * mirroring a type in the target VM with the given name.
 132      */
 133     List<ReferenceType> classesByName(String className);
 134 
 135     /**
 136      * Returns all {@linkplain ReferenceType loaded types} in the target VM.
 137      * <p>
 138      * A class or interface creation can be triggered by one of the following:
 139      * <ul>
 140      * <li>by loading and deriving a class from a `class` file representation
 141      *     using class loader (see JVMS {@jvms 5.3}).
 142      * <li>by invoking {@link java.lang.invoke.MethodHandles.Lookup#defineHiddenClass(byte[], boolean, java.lang.invoke.MethodHandles.Lookup.ClassOption...)
 143      *     Lookup::defineHiddenClass} that creates a {@link Class#isHidden
 144      *     hidden class or interface} from a {@code class} file representation.
 145      * <li>by invoking methods in certain Java SE Platform API such as reflection.
 146      * </ul>
 147      * <p>
 148      * An array class is created directly by Java virtual machine.  An array
 149      * class creation can be triggered by using class loaders or by invoking
 150      * methods in certain Java SE Platform API such as reflection.
 151      * <p>
 152      * The returned list will include all reference types, including
 153      * {@link Class#isHidden hidden classes or interfaces}, loaded
 154      * at least to the point of preparation and types (like array)
 155      * for which preparation is not defined.
 156      *
 157      * @return a list of {@link ReferenceType} objects, each mirroring
 158      * a loaded type in the target VM.
 159      * @jvms 5.3 Creation and Loading
 160      */
 161     List<ReferenceType> allClasses();
 162 
 163     /**
 164      * All classes given are redefined according to the
 165      * definitions supplied.  A method in a redefined class
 166      * is called 'equivalent' (to the old version of the
 167      * method) if
 168      * <UL>
 169      * <LI>their bytecodes are the same except for indicies into
 170      *   the constant pool, and
 171      * <LI>the referenced constants are equal.
 172      * </UL>
 173      * Otherwise, the new method is called 'non-equivalent'.
 174      * If a redefined method has active stack frames, those active
 175      * frames continue to run the bytecodes of the previous version of the
 176      * method.  If the new version of such a method is non-equivalent,
 177      * then a method from one of these active frames is called 'obsolete' and
 178      * {@link Method#isObsolete Method.isObsolete()}
 179      * will return true when called on one of these methods.


< prev index next >