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

Quick Search    Search Deep

Source code: measurements/suites/EfficientEntryExtension.java


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