KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > measurements > suites > EfficientExtension


1 // $Id: EfficientExtension.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 java.lang.reflect.Field JavaDoc;
11
12 import ch.ethz.jvmai.*;
13 import ch.ethz.prose.DefaultAspect;
14 import ch.ethz.prose.crosscut.*;
15 import ch.ethz.prose.filter.PointCutter;
16 import ch.ethz.prose.filter.Within;
17
18 /**
19  * Class EfficientExtension XXX
20  *
21  * @version $Revision: 1.2 $
22  * @author Andrei Popovici
23  */

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