KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > prose > crosscut > AbstractCrosscut


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: AbstractCrosscut.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.crosscut;
28
29 import java.lang.reflect.InvocationTargetException JavaDoc;
30 import java.util.Iterator JavaDoc;
31
32 import ch.ethz.jvmai.ExceptionJoinPoint;
33 import ch.ethz.jvmai.ExceptionCatchJoinPoint;
34 import ch.ethz.jvmai.FieldAccessJoinPoint;
35 import ch.ethz.jvmai.FieldModificationJoinPoint;
36 import ch.ethz.jvmai.JoinPoint;
37 import ch.ethz.jvmai.MethodEntryJoinPoint;
38 import ch.ethz.jvmai.MethodExitJoinPoint;
39 import ch.ethz.prose.ProseSystem;
40 import ch.ethz.prose.Aspect;
41 import ch.ethz.prose.filter.PointCutter;
42 import ch.ethz.prose.filter.PointFilter;
43 import ch.ethz.prose.engine.JoinPointRequest;
44 import ch.ethz.prose.engine.JoinPointManager;
45
46
47
48 /**
49  *
50  * Interface AbstractCrosscut is a Crosscut implementation together with
51  * a filtering mechanism for
52  * both join-point requests and join-point events. Every AbstractCrosscut
53  * owns a <code>PointFilter</code>. A specializer is a
54  * strategy-object used for filtering event requests.
55  * <p>
56  * A Crosscut is used to generate a crosscut request, that is,
57  * a collection of join-point requests(Method <code>createRequest</code>).
58  * Upon the first usage of
59  * a crosscut, the crosscut selects a number of classes in the current
60  * virtual machine or maybe all (default), and then generates for every potential
61  * point inside these classes (e.g. for all method entries, exits, or field
62  * accesses) a separate join point request. Before returning these requests
63  * to the user of the crosscut, it applies the filter provided by its
64  * specializer to every one of them. Only the ones which passed are
65  * returned in the crosscut.
66  * <p>
67  * For each event it receives, the abstract crosscut uses the
68  * specializer as a filter. If the specializer allows the
69  * action corresponding to this event, <code>joinPointAction</code>
70  * is called with the current event as a parameter. If the specializer
71  * disagrees with the current event, no action is performed.
72  *
73  * <h4> How to extend <code>AbstractCrosscut</code></h4>
74  * Every subclass of crosscut will have to provide implementations for
75  * <code>doCreateRequest(Class)</code>, <code>joinPointAction</code> and
76  * possibly for <code>potentialCrosscutClasses</code>. Implementations
77  * of these methods have to use the <code>getRequestFactory</code> to retrieve
78  * the factory for creating the necessary <code>JoinPointRequest</code>
79  * objects.
80  *
81  * @version $Revision: 1.2 $
82  * @author Andrei Popovici
83  * @author Angela Nicoara
84  */

85 public
86 abstract class AbstractCrosscut extends Crosscut {
87
88     private Aspect theOwner = null;
89     private PointFilter theSpecializer = null;
90     private CrosscutGroup transactionGrp = new CrosscutGroup();
91     private static ThreadLocal JavaDoc threadLocalJoinPoint = new ThreadLocal JavaDoc();
92
93
94   /** This is the info interface of the current system.
95    * The implementation must ensure that these interfaces are
96    * initialized when <code>joinPointReached</code> is called.
97    *
98    */

99   protected transient JoinPointManager requestFactory = null;
100
101     /** Upon insertion, the a default (abstract) crosscuts
102      * tries to figure out where it is running. It then
103      * initializes the infoInterface and aspectInterface
104      * variables.
105      *
106      * @param beforeInsertion true if the crosscut is not yet inserted.
107      */

108     public void insertionAction(boolean beforeInsertion)
109     {
110     // BIG FIXME: how do I insert a thing into the test aspect manager?
111
if (requestFactory == null)
112       requestFactory = ProseSystem.getAspectManager().getJoinPointManager();
113     }
114
115
116     public void withdrawalAction(boolean beforeInsertion)
117     {
118       // void
119
}
120
121
122     /** Set the owner of this crosscut. This can be done only if the
123      * current crosscut does not have an owner.
124      *
125      */

126     public void setOwner(Aspect ext) throws IllegalStateException JavaDoc
127     {
128     if (theOwner == null)
129         theOwner = ext;
130     else
131         throw new IllegalStateException JavaDoc("Cannot change ownership of aspects");
132
133     }
134
135
136
137     public Aspect getOwner()
138     {
139     return theOwner;
140     }
141
142   public int getPriority()
143     {
144       if (getOwner() == null)
145     throw new IllegalStateException JavaDoc("A crosscut cannot live outside of an aspect");
146
147       return getOwner().getPriority();
148     }
149
150     /**
151      * Return an array of classes which will be considered for
152      * crosscutting when this crosscut is used to genereate
153      * a crosscut request. A crosscut will implement this method
154      * if and only if the number of classes it crosscuts is limited.
155      * <p>
156      * The default implementation is to return <em>all loaded classes</em>
157      * of the current VM, which means that the default is to crosscut
158      * whatever is loaded in the VM (including abstract classes and
159      * interfaces! (?)).
160      */

161     protected synchronized Class JavaDoc[] potentialCrosscutClasses()
162     {
163       return (Class JavaDoc[])requestFactory.getLoadedClasses().toArray(new Class JavaDoc[]{});
164     }
165
166     /** Override this method if you want to filter
167      * the clases to be crosscut at runtime. The potential crosscut
168      * classes denotes the initial number of classes to be
169      * cutt across. Classes may be loaded later on, and this
170      * method decides whether they should be searched for
171      * join points or not.
172      */

173     protected boolean isPotentialCrosscutClass(Class JavaDoc c)
174     {
175       return true;
176     }
177
178
179
180     /**
181      * This method determines the join-points of the specified
182      * class (<code>c</code>). To generate join-point requests,
183      * it uses the <code>doCreateRequest</code> templated method.
184      * This method guarantees that the resulting requests:
185      * <ol>
186      * <li> belong to classes that pass the predicate
187      * <code>isPotentialCrosscutClass</code>
188      * <li> are allowes by this crosscuts specializer (if any)
189      * </ol>
190      * <p>
191      * This method will also be used every time a new class is
192      * loaded in the current VM in order to determine
193      * the new requests.
194      */

195     public final CrosscutRequest createRequest(Class JavaDoc c)
196     {
197       // make shure we can access the aspect interface
198
requestFactory = ProseSystem.getAspectManager().getJoinPointManager();
199
200       CrosscutRequest result = new CrosscutRequest();
201
202       // there are two optimizations that follow:
203
// 1 (optimization)
204
// try to check whether the user wants this class to be used
205
if (!isPotentialCrosscutClass(c))
206     {
207       return result;
208     }
209
210
211       /// 2 (optimization) a seccond optimization is about speeding the process of crosscut
212
/// creation. A default crosscut will get all classses in the VM,
213
/// create,say, for each field a request and then filter out of the
214
/// 15000 requests the two it is interested in. To speed a little bit
215
/// the process, we create a faked Joinpointrequest, and check
216
/// whether the existing specializer will accept this class.
217
/// BIG FIXME: WITH THE NEW WAY OF DEALING WITH THINGS,
218
/// WE SHOULD BE MORE ELABORATE HERE. The problem is
219
/// that the fakedRequest should be categorized in
220
/// a certain area..
221
// synchronized(fakedRequest)
222
//{
223
//fakedRequest.setTargetClass(c);
224
//if (theSpecializer != null &&g
225
//!theSpecializer.isSpecialRequest(fakedRequest))
226
//return result;
227
//}
228

229       // 3. create a request
230
CrosscutRequest cr = doCreateRequest(c);
231
232       if (getSpecializer() == null)
233           return cr;
234
235       Iterator JavaDoc i = cr.iterator();
236       while (i.hasNext())
237     {
238       JoinPointRequest jpr = (JoinPointRequest)i.next();
239       if (getSpecializer().isSpecialRequest(jpr))
240         result.add(jpr);
241     }
242
243       return result;
244
245     }
246
247
248     /**
249      * This method has to be implemented by subclasses. It basically
250      * represents the initial generation mechanisms for Join point
251      * requests. It should return indiscriminatly a lot of join-points
252      * for every potential join-point in the byte-code of the specified
253      * class.
254      */

255   protected abstract CrosscutRequest doCreateRequest(Class JavaDoc c);
256
257   /** This method has to be implemented by concrete crosscut implementation.
258    * It returns the thread-local <code>JoinPointEvent</code> object. It
259    * can be called just below the control flow of a joinPointAction.
260    *
261    * @throws IllegalStateException if this mehtod is invoked from outside
262    * a join-point notification.
263    */

264     protected JoinPoint thisJoinPoint() throws IllegalStateException JavaDoc
265     {
266     return (JoinPoint)threadLocalJoinPoint.get();
267     }
268
269     /**
270      * This method is the mechanism used by an extension for creating
271      * a crosscut Request. It uses the <code>createRequest(Class c)</code>
272      * method to build up a crosscut for the entire local VM.
273      * It has the following functionality:
274      * for each potential crosscut class (as returned by
275      * <code>potentialCrosscutClasses</code>),
276      * the method <code>createRequest(Class c)</code> is applied.
277      * The result corresponds to the union of all requests returned by
278      * <code>createRequest(Class c)</code>.
279      */

280     public final CrosscutRequest createRequest()
281     {
282       // make shure we can access the aspect interface
283
requestFactory = ProseSystem.getAspectManager().getJoinPointManager();
284
285       //1. create the request
286
//FIXME: I don't like using the constructor!
287
CrosscutRequest result = new CrosscutRequest();
288
289       //2. get the potential crosscut classes
290
Class JavaDoc[] theClasses = potentialCrosscutClasses();
291       if (theClasses == null)
292         return result;
293
294 // System.err.println("AbstractCrosscut - createRequest -> BEGINCLASSES"); //angy test
295
// System.err.println(java.util.Arrays.asList(theClasses)); //angy test
296
// System.err.println("AbstractCrosscut - createRequest -> ENDCLASSES"); //angy test
297

298       //3. the resulting crosscut request is the
299
// union for crosscut requests for all classes.
300
for(int i =0; i <theClasses.length; i++)
301          result.addAll(createRequest(theClasses[i]));
302       return result;
303     }
304
305     /**
306      * This method performs the actions upon receiving a JoinPointEvent.
307      * If this crosscut has a specializer, and the current event is
308      * accepted by the specializer, then
309      * <code>joinPointAction</code> is invoked.
310      * If it has no specializer, <code>joinPointAction</code>
311      * is invoked by default.
312      *
313      * @param jp the current join point
314      * @param the info interface
315      */

316   public void joinPointReached(MethodEntryJoinPoint jp) throws Exception JavaDoc
317     {
318
319     if ( transactionGrp.executeAdvice &&
320          ( (getSpecializer() == null) || getSpecializer().isSpecialEvent(jp)))
321       {
322         threadLocalJoinPoint.set(jp);
323         joinPointAction(jp);
324       }
325     }
326
327   protected PointCutter NOT(PointCutter cs)
328     {
329       return new ch.ethz.prose.filter.NegatingPointCutter(cs);
330     }
331
332     /**
333      * This method performs the actions upon receiving a JoinPointEvent.
334      * If this crosscut has a specializer, and the current event is
335      * accepted by the specializer, then
336      * <code>joinPointAction</code> is invoked.
337      * If it has no specializer, <code>joinPointAction</code>
338      * is invoked by default.
339      *
340      * @param jp the current join point
341      * @param the info interface
342      */

343     public void joinPointReached(MethodExitJoinPoint jp) throws Exception JavaDoc
344     {
345       if ( transactionGrp.executeAdvice &&
346        ( (getSpecializer() == null) || getSpecializer().isSpecialEvent(jp)))
347     {
348       threadLocalJoinPoint.set(jp);
349       joinPointAction(jp);
350     }
351     }
352
353
354
355     /**
356      * This method performs the actions upon receiving a JoinPointEvent.
357      * If this crosscut has a specializer, and the curren\t event is
358      * accepted by the specializer, then
359      * <code>joinPointAction</code> is invoked.
360      * If it has no specializer, <code>joinPointAction</code>
361      * is invoked by default.
362      *
363      * @param jp the current join point
364      * @param the info interface
365      */

366     public void joinPointReached(FieldAccessJoinPoint jp) throws Exception JavaDoc
367     {
368       if ( transactionGrp.executeAdvice &&
369        ( (getSpecializer() == null) || getSpecializer().isSpecialEvent(jp)))
370     {
371       threadLocalJoinPoint.set(jp);
372       joinPointAction(jp);
373     }
374     }
375
376
377     /**
378      * This method performs the actions upon receiving a JoinPointEvent.
379      * If this crosscut has a specializer, and the current event is
380      * accepted by the specializer, then
381      * <code>joinPointAction</code> is invoked.
382      * If it has no specializer, <code>joinPointAction</code>
383      * is invoked by default.
384      *
385      * @param jp the current join point
386      * @param the info interface
387      */

388     public void joinPointReached(FieldModificationJoinPoint jp) throws Exception JavaDoc
389     {
390       if ( transactionGrp.executeAdvice &&
391        ( (getSpecializer() == null) || getSpecializer().isSpecialEvent(jp)))
392     {
393       threadLocalJoinPoint.set(jp);
394       joinPointAction(jp);
395     }
396     }
397
398
399     /**
400      * This method performs the actions upon receiving a JoinPointEvent.
401      * If this crosscut has a specializer, and the current event is
402      * accepted by the specializer, then
403      * <code>joinPointAction</code> is invoked.
404      * If it has no specializer, <code>joinPointAction</code>
405      * is invoked by default.
406      *
407      * @param jp the current join point<
408      * @param the info interface
409      */

410     public void joinPointReached(ExceptionJoinPoint jp) throws Exception JavaDoc
411     {
412
413       if ( transactionGrp.executeAdvice &&
414        ( (getSpecializer() == null) || getSpecializer().isSpecialEvent(jp)))
415     {
416       threadLocalJoinPoint.set(jp);
417       joinPointAction(jp);
418     }
419     }
420
421     /**
422      * This method performs the actions upon receiving a JoinPointEvent.
423      * If this crosscut has a specializer, and the current event is
424      * accepted by the specializer, then
425      * <code>joinPointAction</code> is invoked.
426      * If it has no specializer, <code>joinPointAction</code>
427      * is invoked by default.
428      *
429      * @param jp the current join point
430      * @param the info interface
431      */

432     public void joinPointReached(ExceptionCatchJoinPoint jp) throws Exception JavaDoc
433     {
434       //System.out.println("AbstractCrosscut CATCH -> joinPointReached"); //angy test
435
if ( transactionGrp.executeAdvice &&
436        ( (getSpecializer() == null) || getSpecializer().isSpecialEvent(jp)))
437         {
438           threadLocalJoinPoint.set(jp);
439           joinPointAction(jp);
440         }
441     }
442
443
444     /**
445      * This method should be implemented by subclasses; this method is
446      * a template method. This method should perform the action corresponding
447      * to the receipt of events <code>e</code>.
448      */

449    protected void joinPointAction(FieldModificationJoinPoint e)
450     throws InvocationTargetException JavaDoc,IllegalAccessException JavaDoc
451     {
452     throw new Error JavaDoc("Should not be reached; it should be overriden in subclasses");
453     }
454
455    /**
456      * This method should be implemented by subclasses; this method is
457      * a template method. This method should perform the action corresponding
458      * to the receipt of events <code>e</code>.
459      */

460   protected void joinPointAction(FieldAccessJoinPoint e)
461     throws InvocationTargetException JavaDoc,IllegalAccessException JavaDoc
462     {
463     throw new Error JavaDoc("Should not be reached. it should be overriden in subclasses");
464     }
465
466    /**
467      * This method should be implemented by subclasses; this method is
468      * a template method. This method should perform the action corresponding
469      * to the receipt of events <code>e</code>.
470      */

471    protected void joinPointAction(MethodEntryJoinPoint e)
472     throws InvocationTargetException JavaDoc,IllegalAccessException JavaDoc
473     {
474     throw new Error JavaDoc("Should not be reached.it should be overriden in subclasses");
475     }
476
477   /**
478    * This method should be implemented by subclasses; this method is
479    * a template method. This method should perform the action corresponding
480    * to the receipt of events <code>e</code>.
481    */

482    protected void joinPointAction(MethodExitJoinPoint e)
483     throws InvocationTargetException JavaDoc,IllegalAccessException JavaDoc
484     {
485     throw new Error JavaDoc("Should not be reached.it should be overriden in subclasses");
486     }
487
488   /**
489    * This method should be implemented by subclasses; this method is
490    * a template method. This method should perform the action corresponding
491    * to the receipt of events <code>e</code>.
492    */

493     protected void joinPointAction(ExceptionJoinPoint e)
494     throws InvocationTargetException JavaDoc,IllegalAccessException JavaDoc
495     {
496     throw new Error JavaDoc("Should not be reached.it should be overriden in subclasses");
497     }
498
499     /**
500      * This method should be implemented by subclasses; this method is
501      * a template method. This method should perform the action corresponding
502      * to the receipt of events <code>e</code>.
503      */

504       protected void joinPointAction(ExceptionCatchJoinPoint e)
505       throws InvocationTargetException JavaDoc,IllegalAccessException JavaDoc
506       {
507       throw new Error JavaDoc("Should not be reached.it should be overriden in subclasses");
508       }
509
510
511     /**
512      * Return the current specializer.
513      *
514      * @param the current specializer
515      */

516     public PointFilter getSpecializer()
517     {
518     if (theSpecializer == null)
519         theSpecializer = pointCutter();
520
521     return theSpecializer;
522     }
523
524     protected abstract PointCutter pointCutter();
525
526
527    /**
528     * Associated this crosscut to the group <code>grp</code>.
529     *
530     */

531     public void associateToGroup(CrosscutGroup grp) throws IllegalArgumentException JavaDoc
532     {
533     transactionGrp = grp;
534     }
535
536     /**
537      *
538      */

539     public String JavaDoc toString()
540       {
541     return "Crosscut '" + getClass().getName() +
542           "' specialized with [" + getSpecializer() + "]";
543       }
544 }
545
546
547 //======================================================================
548
//
549
// $Log: AbstractCrosscut.java,v $
550
// Revision 1.2 2004/05/12 09:41:55 anicoara
551
// Remove the README.RVM file
552
//
553
// Revision 1.1.1.1 2003/07/02 15:30:51 apopovic
554
// Imported from ETH Zurich
555
//
556
// Revision 1.3 2003/07/02 12:42:51 anicoara
557
// Added CatchJoinPoint Functionality (Requests, Join-Points, Filters, CatchCuts, Tests)
558
//
559
// Revision 1.2 2003/06/25 09:04:10 popovici
560
// Bug fix in synchronizing class producers and consumers; FIXME comment added to AbstractCrosscut
561
//
562
// Revision 1.1 2003/05/05 13:58:08 popovici
563
// renaming from runes to prose
564
//
565
// Revision 1.28 2003/04/29 12:41:05 popovici
566
// Feature added:
567
// - the 'setPriority' in class insertable allows now Aspects and Crosscuts to have a priority.
568
// Notitification is done from low int priorities to high int priorities.
569
// - the 'setAspectID' introduced to replace constuctor; used to be cumberstone for subclasses
570
//
571
// Revision 1.27 2003/04/27 13:08:57 popovici
572
// Specializers renamed to PointCutter
573
//
574
// Revision 1.26 2003/04/26 18:51:32 popovici
575
// 1 Bug fix which lead to a refactoring step:
576
// 1. the bug: 'JoinPointRequests' used to write to a static list, which survived a startup/teardown;
577
// now this list belongs to the JoinPointManager;
578
// 2. the refactoring: the JoinPointManager now creates (and shares state) with join-points.
579
//
580
// Revision 1.25 2003/04/17 15:15:19 popovici
581
// Extension->Aspect renaming
582
//
583
// Revision 1.24 2003/04/17 13:54:31 popovici
584
// Refactorization of 'ExecutionS' into 'Within' and 'Executions'.
585
// Method names refer now to 'types'
586
//
587
// Revision 1.23 2003/04/17 12:49:24 popovici
588
// Refactoring of the crosscut package
589
// ExceptionCut renamed to ThrowCut
590
// McutSignature is now SignaturePattern
591
//
592
// Revision 1.22 2003/04/17 08:47:16 popovici
593
// Important functionality additions
594
// - Cflow specializers
595
// - Restructuring of the MethodCut, SetCut, ThrowCut, and GetCut (they are much smaller)
596
// - Transactional capabilities
597
// - Total refactoring of Specializer evaluation, which permits fine-grained distinction
598
// between static and dynamic specializers.
599
// - Functionality pulled up in abstract classes
600
// - Uniformization of advice methods patterns and names
601
//
602
// Revision 1.21 2003/03/05 13:13:57 popovici
603
// MethodCut unobfusscated by translating inner
604
// classes for method advice and method signatures
605
// to top level classes.
606
//
607
// Revision 1.20 2003/03/04 18:36:35 popovici
608
// Organization of imprts
609
//
610
// Revision 1.19 2003/03/04 11:27:17 popovici
611
// Important refactorization step (march):
612
// - removal of 'JoinPointEvents'; JoinPoints now have the same function as events
613
// - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM
614
// structures
615
//
616
// Revision 1.18 2003/02/11 14:28:45 popovici
617
// Serialization Problems solved; for MethodCut; Used to deserialize
618
// with null values for 'UserDefinedMCSignature'. Insertion caused problems
619
//
620
// Revision 1.17 2002/11/26 17:15:07 pschoch
621
// RootComponent now added (replaces RootComponent now added (replaces old ProseSystem)
622
// ProseSystem now owns and starts the Aspect interface.
623
// ProseSystem now containes a 'test' AspectManager
624
// AspectManager now owns the JoinPointManager.
625
// ExtensionManger can be 'connected' to the JVM, or disconnected. The
626
// JoinPointManager of a connected Ext.Mgr enables joinpoints; the
627
// JoinPointManger of a disconnected Ext.Mgr never enables join-points
628
// Documentation updated accordingly.
629
//
630
// Revision 1.16 2002/10/31 18:26:50 pschoch
631
// Capability of crosscutting Exceptions added to prose.
632
//
633
// Revision 1.15 2002/10/25 07:42:33 popovici
634
// Undo Chnages Phillippe
635
//
636
// Revision 1.13 2002/06/07 15:30:50 popovici
637
// Documentation updates of FunctionalCrosscut/ClasseS refactorings
638
//
639
// Revision 1.12 2002/06/07 07:47:41 popovici
640
// Feature change: MemberS.doIsSpecialRequest signature changed to include a JoinPointRequest.
641
// This fixed a bug in MethodS.BEFORE1/MethodS.after, which had no way to distinguish between entries and exits
642
//
643
// Revision 1.11 2002/06/05 09:27:58 popovici
644
// thisJoinPoint() introduced in Abstract Crosscut and subclasses;
645
//
646
// Revision 1.10 2002/06/04 12:36:10 popovici
647
// MethodCut occurences replaced with MethodCut
648
//
649
// Revision 1.9 2002/06/04 11:52:32 popovici
650
// Small refactorization: createRequest() now uses createRequest(Class);
651
//
652
// Revision 1.8 2002/05/28 15:57:36 popovici
653
// NOT function added
654
//
655
// Revision 1.7 2002/05/07 10:46:51 popovici
656
// Reorganization of the Specializer package. All specializer related classes
657
// moved to ch.ethz.inf.crossucut.spec; Classes ORSpecializer, ANDspecializer and NOTspecializer is
658
// introduced, the static analysis of filtering simplified, because now specializers
659
// contain a field 'filterType' which is propagated to the root of composite specializers. junit packages updated accordingly
660
//
661
// Revision 1.6 2002/03/28 13:48:40 popovici
662
// Mozilla-ified
663
//
664
// Revision 1.5 2002/03/12 09:49:32 popovici
665
// Join Point listener now abstract class (performance reasons)
666
//
667
// Revision 1.4 2002/03/06 13:48:37 popovici
668
// joinPointAction now in 4 flavours, depending on the join point type
669
//
670
// Revision 1.3 2002/02/21 12:39:19 popovici
671
// Crosscut efficiency issues:
672
// - joinPointAction dispatch based on static optimization
673
// (->doesEventSpecialization, 'setSpecializer' modified)
674
// (->calculation of 'adviceMethodOptimization', in Func.Crossc)
675
// - joinPointAction now uses JoinPoints (not Events)
676
// - JoinPointListeners (including crosscuts) now use joinPointReached(XXXJoinPoint) to avoid casting
677
// Crosscut architectural issues:
678
// - AbstractCrosscut now insertable.
679
// - AbstractCrosscuts owns referecnces to JVMAI
680
//
681
// Revision 1.2 2002/02/05 09:45:54 smarkwal
682
// JVMDI-specific code replaced by JVMAI. Prose-implementation classes and reflection package removed.
683
//
684
// Revision 1.1.1.1 2001/11/29 18:13:16 popovici
685
// Sources from runes
686
//
687
// Revision 1.1.2.12 2001/11/21 11:56:24 popovici
688
//
689
// -The sun.tools.agent and ch.ethz.inf.util.JVMDIUtil functionality
690
// replaced with the iks.jvmdi package. References to this old
691
// functionality replaced throughout the code.
692
// -Partial reimplementation of the ch.ethz.inf.iks.runes classes,
693
// part of their functionality moved to the ch.ethz.prose.reflect
694
// abstract classes. New classes and functionality added to the
695
// ch.ethz.prose.reflect package, partially to reflect the
696
// more stable features taken from the iks.runes packages, partially
697
// to reflect the structure of the VM (constant pool, etc). Functionality in
698
// ch.ethz.prose.crosscut and the junit classes adapted to use the
699
// new form of the ch.ethz.prose.reflect package
700
//
701
// Revision 1.1.2.11 2001/09/24 16:29:49 popovici
702
// demo errors removed
703
//
704
// Revision 1.1.2.10 2001/07/15 13:07:26 popovici
705
// Method 'isPotentialCrosscutClass' added. Optimizations of crosscut
706
// generation added.
707
//
708
// Revision 1.1.2.9 2001/06/08 14:05:24 popovici
709
// Bug fix: automatical update of crosscuts upon class load used to
710
// ignore the type correctness of the crosscut contract. Fixed.
711
//
712
// Revision 1.1.2.8 2001/03/06 08:45:00 mrmuller
713
// corrected spelling in javadoc
714
//
715
// Revision 1.1.2.7 2001/02/21 13:28:58 popovici
716
// Method 'toString' added for subclasses.
717
//
718
// Revision 1.1.2.6 2001/02/13 15:16:30 popovici
719
// JoinPointRequestFactory now transient
720
//
721
// Revision 1.1.2.5 2000/11/28 17:02:07 groos
722
// minor documentation updates.
723
//
724
// Revision 1.1.2.4 2000/11/15 15:14:47 popovici
725
// joinPointAction throws now IllegalAccessException too
726
//
727
// Revision 1.1.2.3 2000/10/30 17:28:49 groos
728
// documentation updates
729
//
730
// Revision 1.1.2.2 2000/10/25 09:07:02 popovici
731
// Bug fixed in 'joinPointReached' : in the absence of specializer, events
732
// were not sent to 'joinPointAction'. Documentation updated. Method 'toString'
733
// added.
734
//
735
// Revision 1.1.2.1 2000/10/23 18:28:09 popovici
736
// Moved from ch.ethz.prose to ch.ethz.prose.crosscut and renamed to
737
// AbstractCrosscut
738
//
739
// Revision 1.1.2.3 2000/10/18 19:21:48 popovici
740
// Uses now 'VirtualMachine' as reflective info factory
741
//
742
// Revision 1.1.2.2 2000/10/18 12:52:21 popovici
743
// Documentation detailed
744
//
745
// Revision 1.1.2.1 2000/10/16 18:26:18 popovici
746
// Documentation Added. Semantic of 'potentialCrosscutClasses' changed
747
// (now returns all loaded classes by default). Method 'doCreateRequest'
748
// added.
749
//
750
// Revision 1.1 2000/10/16 11:53:22 popovici
751
// Initial Revision
752
//
753
Popular Tags