Path: blob/master/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventSetImpl.java
41161 views
/*1* Copyright (c) 1998, 2020, 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.tools.jdi;2627import java.util.ArrayList;28import java.util.Collection;29import java.util.Iterator;30import java.util.NoSuchElementException;31import java.util.Spliterator;32import java.util.Spliterators;3334import com.sun.jdi.Field;35import com.sun.jdi.InternalException;36import com.sun.jdi.Locatable;37import com.sun.jdi.Location;38import com.sun.jdi.Method;39import com.sun.jdi.ObjectReference;40import com.sun.jdi.ReferenceType;41import com.sun.jdi.ThreadReference;42import com.sun.jdi.VMDisconnectedException;43import com.sun.jdi.Value;44import com.sun.jdi.VirtualMachine;45import com.sun.jdi.event.AccessWatchpointEvent;46import com.sun.jdi.event.BreakpointEvent;47import com.sun.jdi.event.ClassPrepareEvent;48import com.sun.jdi.event.ClassUnloadEvent;49import com.sun.jdi.event.Event;50import com.sun.jdi.event.EventIterator;51import com.sun.jdi.event.EventSet;52import com.sun.jdi.event.ExceptionEvent;53import com.sun.jdi.event.MethodEntryEvent;54import com.sun.jdi.event.MethodExitEvent;55import com.sun.jdi.event.ModificationWatchpointEvent;56import com.sun.jdi.event.MonitorContendedEnterEvent;57import com.sun.jdi.event.MonitorContendedEnteredEvent;58import com.sun.jdi.event.MonitorWaitEvent;59import com.sun.jdi.event.MonitorWaitedEvent;60import com.sun.jdi.event.StepEvent;61import com.sun.jdi.event.ThreadDeathEvent;62import com.sun.jdi.event.ThreadStartEvent;63import com.sun.jdi.event.VMDeathEvent;64import com.sun.jdi.event.VMDisconnectEvent;65import com.sun.jdi.event.VMStartEvent;66import com.sun.jdi.event.WatchpointEvent;67import com.sun.jdi.request.EventRequest;6869enum EventDestination {UNKNOWN_EVENT, INTERNAL_EVENT, CLIENT_EVENT};7071/*72* An EventSet is normally created by the transport reader thread when73* it reads a JDWP Composite command. The constructor doesn't unpack74* the events contained in the Composite command and create EventImpls75* for them because that process might involve calling back into the back-end76* which should not be done by the transport reader thread. Instead,77* the raw bytes of the packet are read and stored in the EventSet.78* The EventSet is then added to each EventQueue. When an EventSet is79* removed from an EventQueue, the EventSetImpl.build() method is called.80* This method reads the packet bytes and creates the actual EventImpl objects.81* build() also filters out events for our internal handler and puts them in82* their own EventSet. This means that the EventImpls that are in the EventSet83* that is on the queues are all for client requests.84*/85public class EventSetImpl extends ArrayList<Event> implements EventSet {86private static final long serialVersionUID = -4857338819787924570L;87private VirtualMachineImpl vm; // we implement Mirror88private Packet pkt;89private byte suspendPolicy;90private EventSetImpl internalEventSet;9192public String toString() {93String string = "event set, policy:" + suspendPolicy +94", count:" + this.size() + " = {";95boolean first = true;96for (Event event : this) {97if (!first) {98string += ", ";99}100string += event.toString();101first = false;102}103string += "}";104return string;105}106107abstract class EventImpl extends MirrorImpl implements Event {108109private final byte eventCmd;110private final int requestID;111// This is set only for client requests, not internal requests.112private final EventRequest request;113114/**115* Constructor for events.116*/117protected EventImpl(JDWP.Event.Composite.Events.EventsCommon evt,118int requestID) {119super(EventSetImpl.this.vm);120this.eventCmd = evt.eventKind();121this.requestID = requestID;122EventRequestManagerImpl ermi = EventSetImpl.this.123vm.eventRequestManagerImpl();124this.request = ermi.request(eventCmd, requestID);125}126127/*128* Override superclass back to default equality129*/130public boolean equals(Object obj) {131return this == obj;132}133134public int hashCode() {135return System.identityHashCode(this);136}137138/**139* Constructor for VM disconnected events.140*/141protected EventImpl(byte eventCmd) {142super(EventSetImpl.this.vm);143this.eventCmd = eventCmd;144this.requestID = 0;145this.request = null;146}147148public EventRequest request() {149return request;150}151152int requestID() {153return requestID;154}155156EventDestination destination() {157/*158* We need to decide if this event is for159* 1. an internal request160* 2. a client request that is no longer available, ie161* it has been deleted, or disabled and re-enabled162* which gives it a new ID.163* 3. a current client request that is disabled164* 4. a current enabled client request.165*166* We will filter this set into a set167* that contains only 1s for our internal queue168* and a set that contains only 4s for our client queue.169* If we get an EventSet that contains only 2 and 3170* then we have to resume it if it is not SUSPEND_NONE171* because no one else will.172*/173if (requestID == 0) {174/* An unsolicited event. These have traditionally175* been treated as client events.176*/177return EventDestination.CLIENT_EVENT;178}179180// Is this an event for a current client request?181if (request == null) {182// Nope. Is it an event for an internal request?183EventRequestManagerImpl ermi = this.vm.getInternalEventRequestManager();184if (ermi.request(eventCmd, requestID) != null) {185// Yep186return EventDestination.INTERNAL_EVENT;187}188return EventDestination.UNKNOWN_EVENT;189}190191// We found a client request192if (request.isEnabled()) {193return EventDestination.CLIENT_EVENT;194}195return EventDestination.UNKNOWN_EVENT;196}197198abstract String eventName();199200public String toString() {201return eventName();202}203204}205206abstract class ThreadedEventImpl extends EventImpl {207private ThreadReference thread;208209ThreadedEventImpl(JDWP.Event.Composite.Events.EventsCommon evt,210int requestID, ThreadReference thread) {211super(evt, requestID);212this.thread = thread;213}214215public ThreadReference thread() {216return thread;217}218219public String toString() {220return eventName() + " in thread " + thread.name();221}222}223224abstract class LocatableEventImpl extends ThreadedEventImpl225implements Locatable {226private Location location;227228LocatableEventImpl(JDWP.Event.Composite.Events.EventsCommon evt,229int requestID,230ThreadReference thread, Location location) {231super(evt, requestID, thread);232this.location = location;233}234235public Location location() {236return location;237}238239/**240* For MethodEntry and MethodExit241*/242public Method method() {243return location.method();244}245246public String toString() {247return eventName() + "@" +248((location() == null) ? " null" : location().toString()) +249" in thread " + thread().name();250}251}252253class BreakpointEventImpl extends LocatableEventImpl254implements BreakpointEvent {255BreakpointEventImpl(JDWP.Event.Composite.Events.Breakpoint evt) {256super(evt, evt.requestID, evt.thread, evt.location);257}258259String eventName() {260return "BreakpointEvent";261}262}263264class StepEventImpl extends LocatableEventImpl implements StepEvent {265StepEventImpl(JDWP.Event.Composite.Events.SingleStep evt) {266super(evt, evt.requestID, evt.thread, evt.location);267}268269String eventName() {270return "StepEvent";271}272}273274class MethodEntryEventImpl extends LocatableEventImpl275implements MethodEntryEvent {276MethodEntryEventImpl(JDWP.Event.Composite.Events.MethodEntry evt) {277super(evt, evt.requestID, evt.thread, evt.location);278}279280String eventName() {281return "MethodEntryEvent";282}283}284285class MethodExitEventImpl extends LocatableEventImpl286implements MethodExitEvent {287private Value returnVal = null;288289MethodExitEventImpl(JDWP.Event.Composite.Events.MethodExit evt) {290super(evt, evt.requestID, evt.thread, evt.location);291}292293MethodExitEventImpl(JDWP.Event.Composite.Events.MethodExitWithReturnValue evt) {294super(evt, evt.requestID, evt.thread, evt.location);295returnVal = evt.value;296}297298String eventName() {299return "MethodExitEvent";300}301302public Value returnValue() {303if (!this.vm.canGetMethodReturnValues()) {304throw new UnsupportedOperationException(305"target does not support return values in MethodExit events");306}307return returnVal;308}309310}311312class MonitorContendedEnterEventImpl extends LocatableEventImpl313implements MonitorContendedEnterEvent {314private ObjectReference monitor = null;315316MonitorContendedEnterEventImpl(JDWP.Event.Composite.Events.MonitorContendedEnter evt) {317super(evt, evt.requestID, evt.thread, evt.location);318this.monitor = evt.object;319}320321String eventName() {322return "MonitorContendedEnter";323}324325public ObjectReference monitor() {326return monitor;327};328329}330331class MonitorContendedEnteredEventImpl extends LocatableEventImpl332implements MonitorContendedEnteredEvent {333private ObjectReference monitor = null;334335MonitorContendedEnteredEventImpl(JDWP.Event.Composite.Events.MonitorContendedEntered evt) {336super(evt, evt.requestID, evt.thread, evt.location);337this.monitor = evt.object;338}339340String eventName() {341return "MonitorContendedEntered";342}343344public ObjectReference monitor() {345return monitor;346};347348}349350class MonitorWaitEventImpl extends LocatableEventImpl351implements MonitorWaitEvent {352private ObjectReference monitor = null;353private long timeout;354355MonitorWaitEventImpl(JDWP.Event.Composite.Events.MonitorWait evt) {356super(evt, evt.requestID, evt.thread, evt.location);357this.monitor = evt.object;358this.timeout = evt.timeout;359}360361String eventName() {362return "MonitorWait";363}364365public ObjectReference monitor() {366return monitor;367};368369public long timeout() {370return timeout;371}372}373374class MonitorWaitedEventImpl extends LocatableEventImpl375implements MonitorWaitedEvent {376private ObjectReference monitor = null;377private boolean timed_out;378379MonitorWaitedEventImpl(JDWP.Event.Composite.Events.MonitorWaited evt) {380super(evt, evt.requestID, evt.thread, evt.location);381this.monitor = evt.object;382this.timed_out = evt.timed_out;383}384385String eventName() {386return "MonitorWaited";387}388389public ObjectReference monitor() {390return monitor;391};392393public boolean timedout() {394return timed_out;395}396}397398class ClassPrepareEventImpl extends ThreadedEventImpl399implements ClassPrepareEvent {400private ReferenceType referenceType;401402ClassPrepareEventImpl(JDWP.Event.Composite.Events.ClassPrepare evt) {403super(evt, evt.requestID, evt.thread);404referenceType = this.vm.referenceType(evt.typeID, evt.refTypeTag,405evt.signature);406((ReferenceTypeImpl)referenceType).setStatus(evt.status);407}408409public ReferenceType referenceType() {410return referenceType;411}412413String eventName() {414return "ClassPrepareEvent";415}416}417418class ClassUnloadEventImpl extends EventImpl implements ClassUnloadEvent {419private String classSignature;420421ClassUnloadEventImpl(JDWP.Event.Composite.Events.ClassUnload evt) {422super(evt, evt.requestID);423this.classSignature = evt.signature;424}425426public String className() {427return JNITypeParser.convertSignatureToClassname(classSignature);428}429430public String classSignature() {431return classSignature;432}433434String eventName() {435return "ClassUnloadEvent";436}437}438439class ExceptionEventImpl extends LocatableEventImpl440implements ExceptionEvent {441private ObjectReference exception;442private Location catchLocation;443444ExceptionEventImpl(JDWP.Event.Composite.Events.Exception evt) {445super(evt, evt.requestID, evt.thread, evt.location);446this.exception = evt.exception;447this.catchLocation = evt.catchLocation;448}449450public ObjectReference exception() {451return exception;452}453454public Location catchLocation() {455return catchLocation;456}457458String eventName() {459return "ExceptionEvent";460}461}462463class ThreadDeathEventImpl extends ThreadedEventImpl464implements ThreadDeathEvent {465ThreadDeathEventImpl(JDWP.Event.Composite.Events.ThreadDeath evt) {466super(evt, evt.requestID, evt.thread);467}468469String eventName() {470return "ThreadDeathEvent";471}472}473474class ThreadStartEventImpl extends ThreadedEventImpl475implements ThreadStartEvent {476ThreadStartEventImpl(JDWP.Event.Composite.Events.ThreadStart evt) {477super(evt, evt.requestID, evt.thread);478}479480String eventName() {481return "ThreadStartEvent";482}483}484485class VMStartEventImpl extends ThreadedEventImpl486implements VMStartEvent {487VMStartEventImpl(JDWP.Event.Composite.Events.VMStart evt) {488super(evt, evt.requestID, evt.thread);489}490491String eventName() {492return "VMStartEvent";493}494}495496class VMDeathEventImpl extends EventImpl implements VMDeathEvent {497498VMDeathEventImpl(JDWP.Event.Composite.Events.VMDeath evt) {499super(evt, evt.requestID);500}501502String eventName() {503return "VMDeathEvent";504}505}506507class VMDisconnectEventImpl extends EventImpl508implements VMDisconnectEvent {509510VMDisconnectEventImpl() {511super((byte)JDWP.EventKind.VM_DISCONNECTED);512}513514String eventName() {515return "VMDisconnectEvent";516}517}518519abstract class WatchpointEventImpl extends LocatableEventImpl520implements WatchpointEvent {521private final ReferenceTypeImpl refType;522private final long fieldID;523private final ObjectReference object;524private Field field = null;525526WatchpointEventImpl(JDWP.Event.Composite.Events.EventsCommon evt,527int requestID,528ThreadReference thread, Location location,529byte refTypeTag, long typeID, long fieldID,530ObjectReference object) {531super(evt, requestID, thread, location);532this.refType = this.vm.referenceType(typeID, refTypeTag);533this.fieldID = fieldID;534this.object = object;535}536537public Field field() {538if (field == null) {539field = refType.getFieldMirror(fieldID);540}541return field;542}543544public ObjectReference object() {545return object;546}547548public Value valueCurrent() {549if (object == null) {550return refType.getValue(field());551} else {552return object.getValue(field());553}554}555}556557class AccessWatchpointEventImpl extends WatchpointEventImpl558implements AccessWatchpointEvent {559560AccessWatchpointEventImpl(JDWP.Event.Composite.Events.FieldAccess evt) {561super(evt, evt.requestID, evt.thread, evt.location,562evt.refTypeTag, evt.typeID, evt.fieldID, evt.object);563}564565String eventName() {566return "AccessWatchpoint";567}568}569570class ModificationWatchpointEventImpl extends WatchpointEventImpl571implements ModificationWatchpointEvent {572Value newValue;573574ModificationWatchpointEventImpl(575JDWP.Event.Composite.Events.FieldModification evt) {576super(evt, evt.requestID, evt.thread, evt.location,577evt.refTypeTag, evt.typeID, evt.fieldID, evt.object);578this.newValue = evt.valueToBe;579}580581public Value valueToBe() {582return newValue;583}584585String eventName() {586return "ModificationWatchpoint";587}588}589590/**591* Events are constructed on the thread which reads all data from the592* transport. This means that the packet cannot be converted to real593* JDI objects as that may involve further communications with the594* back end which would deadlock.595*596* Hence the {@link #build()} method below called by EventQueue.597*/598EventSetImpl(VirtualMachine aVm, Packet pkt) {599super();600601// From "MirrorImpl":602// Yes, its a bit of a hack. But by doing it this603// way, this is the only place we have to change604// typing to substitute a new impl.605vm = (VirtualMachineImpl)aVm;606607this.pkt = pkt;608}609610/**611* Constructor for special events like VM disconnected612*/613EventSetImpl(VirtualMachine aVm, byte eventCmd) {614this(aVm, null);615suspendPolicy = JDWP.SuspendPolicy.NONE;616switch (eventCmd) {617case JDWP.EventKind.VM_DISCONNECTED:618addEvent(new VMDisconnectEventImpl());619break;620621default:622throw new InternalException("Bad singleton event code");623}624}625626private void addEvent(EventImpl evt) {627// Note that this class has a public add method that throws628// an exception so that clients can't modify the EventSet629super.add(evt);630}631632/*633* Complete the construction of an EventSet. This is called from634* an event handler thread. It upacks the JDWP events inside635* the packet and creates EventImpls for them. The EventSet is already636* on EventQueues when this is called, so it has to be synch.637*/638synchronized void build() {639if (pkt == null) {640return;641}642PacketStream ps = new PacketStream(vm, pkt);643JDWP.Event.Composite compEvt = new JDWP.Event.Composite(vm, ps);644suspendPolicy = compEvt.suspendPolicy;645if ((vm.traceFlags & VirtualMachine.TRACE_EVENTS) != 0) {646switch(suspendPolicy) {647case JDWP.SuspendPolicy.ALL:648vm.printTrace("EventSet: SUSPEND_ALL");649break;650651case JDWP.SuspendPolicy.EVENT_THREAD:652vm.printTrace("EventSet: SUSPEND_EVENT_THREAD");653break;654655case JDWP.SuspendPolicy.NONE:656vm.printTrace("EventSet: SUSPEND_NONE");657break;658}659}660661ThreadReference fix6485605 = null;662for (int i = 0; i < compEvt.events.length; i++) {663EventImpl evt = createEvent(compEvt.events[i]);664if ((vm.traceFlags & VirtualMachine.TRACE_EVENTS) != 0) {665try {666vm.printTrace("Event: " + evt);667} catch (VMDisconnectedException ee) {668// ignore - see bug 6502716669}670}671672switch (evt.destination()) {673case UNKNOWN_EVENT:674// Ignore disabled, deleted, unknown events, but675// save the thread if there is one since we might676// have to resume it. Note that events for different677// threads can't be in the same event set.678if (evt instanceof ThreadedEventImpl &&679suspendPolicy == JDWP.SuspendPolicy.EVENT_THREAD) {680fix6485605 = ((ThreadedEventImpl)evt).thread();681}682continue;683case CLIENT_EVENT:684addEvent(evt);685break;686case INTERNAL_EVENT:687if (internalEventSet == null) {688internalEventSet = new EventSetImpl(this.vm, null);689}690internalEventSet.addEvent(evt);691break;692default:693throw new InternalException("Invalid event destination");694}695}696pkt = null; // No longer needed - free it up697698// Avoid hangs described in 6296125, 6293795699if (super.size() == 0) {700// This set has no client events. If we don't do701// needed resumes, no one else is going to.702if (suspendPolicy == JDWP.SuspendPolicy.ALL) {703vm.resume();704} else if (suspendPolicy == JDWP.SuspendPolicy.EVENT_THREAD) {705// See bug 6485605.706if (fix6485605 != null) {707fix6485605.resume();708} else {709// apparently, there is nothing to resume.710}711}712suspendPolicy = JDWP.SuspendPolicy.NONE;713714}715716}717718/**719* Filter out internal events720*/721EventSet userFilter() {722return this;723}724725/**726* Filter out user events.727*/728EventSet internalFilter() {729return this.internalEventSet;730}731732EventImpl createEvent(JDWP.Event.Composite.Events evt) {733JDWP.Event.Composite.Events.EventsCommon comm = evt.aEventsCommon;734switch (evt.eventKind) {735case JDWP.EventKind.THREAD_START:736return new ThreadStartEventImpl(737(JDWP.Event.Composite.Events.ThreadStart)comm);738739case JDWP.EventKind.THREAD_END:740return new ThreadDeathEventImpl(741(JDWP.Event.Composite.Events.ThreadDeath)comm);742743case JDWP.EventKind.EXCEPTION:744return new ExceptionEventImpl(745(JDWP.Event.Composite.Events.Exception)comm);746747case JDWP.EventKind.BREAKPOINT:748return new BreakpointEventImpl(749(JDWP.Event.Composite.Events.Breakpoint)comm);750751case JDWP.EventKind.METHOD_ENTRY:752return new MethodEntryEventImpl(753(JDWP.Event.Composite.Events.MethodEntry)comm);754755case JDWP.EventKind.METHOD_EXIT:756return new MethodExitEventImpl(757(JDWP.Event.Composite.Events.MethodExit)comm);758759case JDWP.EventKind.METHOD_EXIT_WITH_RETURN_VALUE:760return new MethodExitEventImpl(761(JDWP.Event.Composite.Events.MethodExitWithReturnValue)comm);762763case JDWP.EventKind.FIELD_ACCESS:764return new AccessWatchpointEventImpl(765(JDWP.Event.Composite.Events.FieldAccess)comm);766767case JDWP.EventKind.FIELD_MODIFICATION:768return new ModificationWatchpointEventImpl(769(JDWP.Event.Composite.Events.FieldModification)comm);770771case JDWP.EventKind.SINGLE_STEP:772return new StepEventImpl(773(JDWP.Event.Composite.Events.SingleStep)comm);774775case JDWP.EventKind.CLASS_PREPARE:776return new ClassPrepareEventImpl(777(JDWP.Event.Composite.Events.ClassPrepare)comm);778779case JDWP.EventKind.CLASS_UNLOAD:780return new ClassUnloadEventImpl(781(JDWP.Event.Composite.Events.ClassUnload)comm);782783case JDWP.EventKind.MONITOR_CONTENDED_ENTER:784return new MonitorContendedEnterEventImpl(785(JDWP.Event.Composite.Events.MonitorContendedEnter)comm);786787case JDWP.EventKind.MONITOR_CONTENDED_ENTERED:788return new MonitorContendedEnteredEventImpl(789(JDWP.Event.Composite.Events.MonitorContendedEntered)comm);790791case JDWP.EventKind.MONITOR_WAIT:792return new MonitorWaitEventImpl(793(JDWP.Event.Composite.Events.MonitorWait)comm);794795case JDWP.EventKind.MONITOR_WAITED:796return new MonitorWaitedEventImpl(797(JDWP.Event.Composite.Events.MonitorWaited)comm);798799case JDWP.EventKind.VM_START:800return new VMStartEventImpl(801(JDWP.Event.Composite.Events.VMStart)comm);802803case JDWP.EventKind.VM_DEATH:804return new VMDeathEventImpl(805(JDWP.Event.Composite.Events.VMDeath)comm);806807default:808// Ignore unknown event types809System.err.println("Ignoring event cmd " +810evt.eventKind + " from the VM");811return null;812}813}814815public VirtualMachine virtualMachine() {816return vm;817}818819public int suspendPolicy() {820return EventRequestManagerImpl.JDWPtoJDISuspendPolicy(suspendPolicy);821}822823private ThreadReference eventThread() {824for (Event event : this) {825if (event instanceof ThreadedEventImpl) {826return ((ThreadedEventImpl)event).thread();827}828}829return null;830}831832public void resume() {833switch (suspendPolicy()) {834case EventRequest.SUSPEND_ALL:835vm.resume();836break;837case EventRequest.SUSPEND_EVENT_THREAD:838ThreadReference thread = eventThread();839if (thread == null) {840throw new InternalException("Inconsistent suspend policy");841}842thread.resume();843break;844case EventRequest.SUSPEND_NONE:845// Do nothing846break;847default:848throw new InternalException("Invalid suspend policy");849}850}851852public Iterator<Event> iterator() {853return new Itr();854}855856public EventIterator eventIterator() {857return new Itr();858}859860public class Itr implements EventIterator {861/**862* Index of element to be returned by subsequent call to next.863*/864int cursor = 0;865866public boolean hasNext() {867return cursor != size();868}869870public Event next() {871try {872Event nxt = get(cursor);873++cursor;874return nxt;875} catch(IndexOutOfBoundsException e) {876throw new NoSuchElementException();877}878}879880public Event nextEvent() {881return next();882}883884public void remove() {885throw new UnsupportedOperationException();886}887}888889@Override890public Spliterator<Event> spliterator() {891return Spliterators.spliterator(this, Spliterator.DISTINCT);892}893894/* below make this unmodifiable */895896public boolean add(Event o){897throw new UnsupportedOperationException();898}899public boolean remove(Object o) {900throw new UnsupportedOperationException();901}902public boolean addAll(Collection<? extends Event> coll) {903throw new UnsupportedOperationException();904}905public boolean removeAll(Collection<?> coll) {906throw new UnsupportedOperationException();907}908public boolean retainAll(Collection<?> coll) {909throw new UnsupportedOperationException();910}911public void clear() {912throw new UnsupportedOperationException();913}914}915916917