1 // 2 // This file is part of the prose package. 3 // 4 // The contents of this file are subject to the Mozilla Public License 5 // Version 1.1 (the "License"); you may not use this file except in 6 // compliance with the License. You may obtain a copy of the License at 7 // http://www.mozilla.org/MPL/ 8 // 9 // Software distributed under the License is distributed on an "AS IS" basis, 10 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 // for the specific language governing rights and limitations under the 12 // License. 13 // 14 // The Original Code is prose. 15 // 16 // The Initial Developer of the Original Code is Andrei Popovici. Portions 17 // created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici. 18 // All Rights Reserved. 19 // 20 // Contributor(s): 21 // $Id: JoinPointListener.java,v 1.2 2004/05/12 09:41:55 anicoara Exp $ 22 // ===================================================================== 23 // 24 // (history at end) 25 // 26 27 package ch.ethz.prose.engine; 28 import ch.ethz.jvmai.ExceptionJoinPoint; 29 import ch.ethz.jvmai.ExceptionCatchJoinPoint; 30 import ch.ethz.jvmai.FieldAccessJoinPoint; 31 import ch.ethz.jvmai.FieldModificationJoinPoint; 32 import ch.ethz.jvmai.MethodEntryJoinPoint; 33 import ch.ethz.jvmai.MethodExitJoinPoint; 34 35 /** 36 * Interface JoinPointListener should be implemented by all interfaces 37 * interested in JoinPointEvents. A listener can be registered 38 * together with an instance of <code>JoinPointRequest</code> into 39 * a <code>JoinPointManager</code>. As a consequesce, the listener 40 * will be notified using the method <code>joinPointReached</code> 41 * about every time the join point is reached. 42 * 43 * 44 * @version $Revision: 1.2 $ 45 * @author Andrei Popovici 46 * @author Angela Nicoara 47 */ 48 public 49 abstract class JoinPointListener { 50 51 /** A join point corresponding to the request this listener 52 * was registered together with has occurred. 53 */ 54 public abstract void joinPointReached(MethodEntryJoinPoint e) 55 throws Exception; 56 57 public abstract void joinPointReached(MethodExitJoinPoint e) 58 throws Exception; 59 60 public abstract void joinPointReached(FieldAccessJoinPoint e) 61 throws Exception; 62 63 public abstract void joinPointReached(FieldModificationJoinPoint e) 64 throws Exception; 65 66 public abstract void joinPointReached(ExceptionJoinPoint e) 67 throws Exception; 68 69 public abstract void joinPointReached(ExceptionCatchJoinPoint e) 70 throws Exception; 71 } 72 73 74 //====================================================================== 75 // 76 // $Log: JoinPointListener.java,v $ 77 // Revision 1.2 2004/05/12 09:41:55 anicoara 78 // Remove the README.RVM file 79 // 80 // Revision 1.1.1.1 2003/07/02 15:30:51 apopovic 81 // Imported from ETH Zurich 82 // 83 // Revision 1.2 2003/07/02 12:42:54 anicoara 84 // Added CatchJoinPoint Functionality (Requests, Join-Points, Filters, CatchCuts, Tests) 85 // 86 // Revision 1.1 2003/05/05 13:58:26 popovici 87 // renaming from runes to prose 88 // 89 // Revision 1.12 2003/03/04 18:36:04 popovici 90 // Organization of imprts 91 // 92 // Revision 1.11 2003/03/04 11:27:30 popovici 93 // Important refactorization step (march): 94 // - removal of 'JoinPointEvents'; JoinPoints now have the same function as events 95 // - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM 96 // structures 97 // 98 // Revision 1.10 2002/10/31 18:26:54 pschoch 99 // Capability of crosscutting Exceptions added to prose. 100 // 101 // Revision 1.9 2002/10/25 07:42:38 popovici 102 // Undo Chnages Phillippe 103 // 104 // Revision 1.7 2002/10/17 17:05:54 pschoch 105 // Added throw capabability to JVMAI 106 // 107 // Revision 1.6 2002/10/17 12:23:43 pschoch 108 // Added throw capabability to JVMAI 109 // 110 // Revision 1.5 2002/03/28 13:48:49 popovici 111 // Mozilla-ified 112 // 113 // Revision 1.4 2002/03/12 09:49:32 popovici 114 // Join Point listener now abstract class (performance reasons) 115 // 116 // Revision 1.3 2002/02/21 12:39:20 popovici 117 // Crosscut efficiency issues: 118 // - joinPointAction dispatch based on static optimization 119 // (->doesEventSpecialization, 'setSpecializer' modified) 120 // (->calculation of 'adviceMethodOptimization', in Func.Crossc) 121 // - joinPointAction now uses JoinPoints (not Events) 122 // - JoinPointListeners (including crosscuts) now use joinPointReached(XXXJoinPoint) to avoid casting 123 // Crosscut architectural issues: 124 // - AbstractCrosscut now insertable. 125 // - AbstractCrosscuts owns referecnces to JVMAI 126 // 127 // Revision 1.2 2002/02/05 10:00:55 smarkwal 128 // JVMDI-specific code replaced by JVMAI. Prose-implementation classes and reflection package removed. 129 // 130 // Revision 1.1.1.1 2001/11/29 18:13:19 popovici 131 // Sources from runes 132 // 133 // Revision 1.1.2.1 2000/10/16 20:09:19 popovici 134 // Documentation added. 135 // 136 // Revision 1.1 2000/10/16 11:55:37 popovici 137 // Initial Revision 138 // 139