Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: measurements/suites/EfficientExitExtension.java


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