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