1/* 2 * Copyright (c) 1998, 2013, 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 23 * questions. 24 */ 25 26package com.sun.jdi.event; 27 28import com.sun.jdi.*; 29 30/** 31 * Notification of a class prepare in the target VM. See the JVM 32 * specification for a definition of class preparation. Class prepare 33 * events are not generated for primtiive classes (for example, 34 * java.lang.Integer.TYPE). 35 * 36 * @see EventQueue 37 * @see VirtualMachine 38 * 39 * @author Robert Field 40 * @since 1.3 41 */ 42public interface ClassPrepareEvent extends Event { 43 /** 44 * Returns the thread in which this event has occurred. 45 * <p> 46 * In rare cases, this event may occur in a debugger system 47 * thread within the target VM. Debugger threads take precautions 48 * to prevent these events, but they cannot be avoided under some 49 * conditions, especially for some subclasses of 50 * {@link java.lang.Error}. 51 * If the event was generated by a debugger system thread, the 52 * value returned by this method is null, and if the requested 53 * suspend policy for the event was 54 * {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD}, 55 * all threads will be suspended instead, and the 56 * {@link EventSet#suspendPolicy} will reflect this change. 57 * <p> 58 * Note that the discussion above does not apply to system threads 59 * created by the target VM during its normal (non-debug) operation. 60 * 61 * @return a {@link ThreadReference} which mirrors the event's thread in 62 * the target VM, or null in the rare cases described above. 63 */ 64 public ThreadReference thread(); 65 66 /** 67 * Returns the reference type for which this event was generated. 68 * 69 * @return a {@link ReferenceType} which mirrors the class, interface, or 70 * array which has been linked. 71 */ 72 public ReferenceType referenceType(); 73} 74