KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > measurements > suites > EfficientExitExtension


1 // $Id: EfficientExitExtension.java,v 1.2 2004/05/12 17:26:53 anicoara Exp $
2
// =====================================================================
3
//
4
// (history at end)
5
//
6

7 package measurements.suites;
8
9 // used packages
10
import ch.ethz.jvmai.*;
11 import ch.ethz.prose.DefaultAspect;
12 import ch.ethz.prose.crosscut.*;
13 import ch.ethz.prose.filter.*;
14
15 /**
16  * Class EfficientExitExtension XXX
17  *
18  * @version $Revision: 1.2 $
19  * @author Andrei Popovici
20  */

21 public
22 class EfficientExitExtension extends DefaultAspect {
23   public Crosscut trapMethods = new MethodCut()
24     {
25       public void ANYMEHTOD()
26     {}
27
28       public void joinPointAction(MethodEntryJoinPoint jpe)
29     {
30     }
31
32       public void joinPointAction(MethodExitJoinPoint jpe)
33     {
34     }
35
36     protected PointCutter pointCutter()
37     {
38      return ( (Executions.after()) .AND
39       ((Within.type("TestClassCalibration1")) .OR (Within.type("TestClass1")) ) .AND
40       (Within.packageTypes("measurements.suites")) );
41     }
42     };
43
44
45   public Crosscut trapGets = new GetCut()
46   {
47         public void joinPointAction(FieldAccessJoinPoint jpe) {}
48         public void GET_ARGS() {}
49
50         protected PointCutter pointCutter()
51         { return ( ( (Within.type("TestClass1")) .OR
52                      (Within.type("TestClass1"))). AND
53                    (Within.packageTypes("measurements.suites")));
54         }
55   };
56
57   public Crosscut trapSets = new SetCut()
58   {
59         public void joinPointAction(FieldModificationJoinPoint jpe) {}
60
61         public void SET_ARGS(){}
62         
63         protected PointCutter pointCutter()
64         { return ( ( (Within.type("TestClass1")) .OR
65                      (Within.type("TestClass1"))). AND
66                    (Within.packageTypes("measurements.suites")));
67         }
68   };
69 }
70
71
72 //======================================================================
73
//
74
// $Log: EfficientExitExtension.java,v $
75
// Revision 1.2 2004/05/12 17:26:53 anicoara
76
// Adapt Junit tests to 3.8.1 version and the new package structure
77
//
78
// Revision 1.1.1.1 2003/07/02 15:30:45 apopovic
79
// Imported from ETH Zurich
80
//
81
// Revision 1.15 2003/05/05 14:03:02 popovici
82
// renaming from runes to prose
83
//
84
// Revision 1.14 2003/04/27 13:08:59 popovici
85
// Specializers renamed to PointCutter
86
//
87
// Revision 1.13 2003/04/17 15:14:53 popovici
88
// Extension->Aspect renaming
89
//
90
// Revision 1.12 2003/04/17 13:54:30 popovici
91
// Refactorization of 'ExecutionS' into 'Within' and 'Executions'.
92
// Method names refer now to 'types'
93
//
94
// Revision 1.11 2003/04/17 12:49:17 popovici
95
// Refactoring of the crosscut package
96
// ExceptionCut renamed to ThrowCut
97
// McutSignature is now SignaturePattern
98
//
99
// Revision 1.10 2003/04/17 08:46:58 popovici
100
// Important functionality additions
101
// - Cflow specializers
102
// - Restructuring of the MethodCut, SetCut, ThrowCut, and GetCut (they are much smaller)
103
// - Transactional capabilities
104
// - Total refactoring of Specializer evaluation, which permits fine-grained distinction
105
// between static and dynamic specializers.
106
// - Functionality pulled up in abstract classes
107
// - Uniformization of advice methods patterns and names
108
//
109
// Revision 1.9 2003/03/05 08:31:26 popovici
110
// Bug fix afeer import organization
111
//
112
// Revision 1.8 2003/03/04 18:36:00 popovici
113
// Organization of imprts
114
//
115
// Revision 1.7 2003/03/04 11:26:10 popovici
116
// Important refactorization step (march):
117
// - removal of 'JoinPointEvents'; JoinPoints now have the same function as events
118
// - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM
119
// structures
120
//
121
// Revision 1.6 2002/06/06 14:39:51 popovici
122
// Renamings: FunctionalCrosscut->MethodCut
123
// AllFields->SetCut
124
// SetCu.fieldModiticationAdvice -> SetCut.setAdvice
125
//
126
// Revision 1.5 2002/06/06 12:01:49 popovici
127
// fieldAccessAdvice removed from AllFields; tests and usage of AllFields's
128
// ability to intercept gets moved to 'GetCut'
129
// Minor bug fixes;
130
//
131
// Revision 1.4 2002/06/05 12:03:50 popovici
132
// thisJoinPoint() updated everywhere. The 'fieldModificationAdvice is now parameterless'; older implemnentations now
133
// use 'thisJoinPoint()'
134
//
135
// Revision 1.3 2002/06/04 12:36:09 popovici
136
// AllLocations occurences replaced with FunctionalCrosscut
137
//
138
// Revision 1.2 2002/05/22 11:00:34 popovici
139
// ClasseS replaced with DeclarationS
140
//
141
// Revision 1.1 2002/03/28 13:34:26 popovici
142
// Exit/Entry|Aspect and Exit/Entry|Aspect replace old ProseExtension & AspectJAspect files
143
//
144
// Revision 1.1 2002/03/12 09:50:14 popovici
145
// Initial version of the Benchmark measurements
146
//
147
Popular Tags