KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > tracing > TracingConf


1 /*
2   Copyright (C) 2001 Renaud Pawlak
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.aspects.tracing;
19
20 /**
21  * This sample aspect component traces the calls on all the objects of
22  * the program.
23  *
24  * <p>To be active this aspect component must be configured with the
25  * <code>addTrace</code> method.
26  * @see TracingAC
27  * @see org.objectweb.jac.wrappers.VerboseWrapper */

28
29 public interface TracingConf {
30
31    /**
32     * This configuration method makes a method call to be traced by a
33     * verbose wrapper.
34     *
35     * By default no method is verbose.
36     *
37     * @param wrappeeExpr a regular expression that matches the
38     * wrappee(s) name(s) that contain the method(s) to be traced
39     * @param wrappeeClassExpr a regular expression that matches the
40     * wrappee(s) class(es) name(s) that contain the method(s) to be
41     * traced
42     * @param wrappeeMethodExpr a regular expression that matches the
43     * method(s) to be traced (within the classes or objects denoted by
44     * the previous parameters)
45     * @see org.objectweb.jac.wrappers.VerboseWrapper */

46
47    void addTrace(String JavaDoc wrappeeExpr,
48                  String JavaDoc wrappeeClassExpr,
49                  String JavaDoc wrappeeMethodExpr);
50
51    /**
52     * This configuration method makes a method call to be traced. The
53     * names of parameters are printed if configured by the Gui aspect.
54     *
55     * @param wrappeeExpr a regular expression that matches the
56     * wrappee(s) name(s) that contain the method(s) to be traced
57     * @param wrappeeClassExpr a regular expression that matches the
58     * wrappee(s) class(es) name(s) that contain the method(s) to be
59     * traced
60     * @param wrappeeMethodExpr a regular expression that matches the
61     * method(s) to be traced (within the classes or objects denoted by
62     * the previous parameters)
63     * @see org.objectweb.jac.wrappers.VerboseWrapper */

64    void addNamedTrace(String JavaDoc wrappeeExpr,
65                       String JavaDoc wrappeeClassExpr,
66                       String JavaDoc wrappeeMethodExpr);
67
68    /**
69     * This configuration method makes a method call to be traced by a
70     * verbose wrapper. For each call, the stack is dumped.
71     *
72     * By default no method is verbose.
73     *
74     * @param wrappeeExpr a regular expression that matches the
75     * wrappee(s) name(s) that contain the method(s) to be traced
76     * @param wrappeeClassExpr a regular expression that matches the
77     * wrappee(s) class(es) name(s) that contain the method(s) to be
78     * traced
79     * @param wrappeeMethodExpr a regular expression that matches the
80     * method(s) to be traced (within the classes or objects denoted by
81     * the previous parameters)
82     * @see org.objectweb.jac.wrappers.VerboseWrapper */

83    void addStackTrace(String JavaDoc wrappeeExpr,
84                       String JavaDoc wrappeeClassExpr,
85                       String JavaDoc wrappeeMethodExpr);
86
87
88
89    /**
90     * This configuration method makes a method call to be traced by a
91     * verbose wrapper. For each call, the wrapping methods are printed.
92     *
93     * By default no method is verbose.
94     *
95     * @param wrappeeExpr a regular expression that matches the
96     * wrappee(s) name(s) that contain the method(s) to be traced
97     * @param wrappeeClassExpr a regular expression that matches the
98     * wrappee(s) class(es) name(s) that contain the method(s) to be
99     * traced
100     * @param wrappeeMethodExpr a regular expression that matches the
101     * method(s) to be traced (within the classes or objects denoted by
102     * the previous parameters)
103     * @see org.objectweb.jac.wrappers.VerboseWrapper */

104    void addWrappersTrace(String JavaDoc wrappeeExpr,
105                          String JavaDoc wrappeeClassExpr,
106                          String JavaDoc wrappeeMethodExpr);
107
108    /**
109     * This configuration method creates a new recording on a set of
110     * methods.
111     *
112     * @param wrappeeExpr a pointcut expression that matches the
113     * wrappee(s) name(s) that contain the method(s) to be traced
114     * @param wrappeeClassExpr a pointcut expression that matches the
115     * wrappee(s) class(es) name(s) that contain the method(s) to be
116     * traced
117     * @param wrappeeMethodExpr a pointcut expression that matches the
118     * method(s) to be traced (within the classes or objects denoted by
119     * the previous parameters) */

120
121    void addRecording(String JavaDoc wrappeeExpr,
122                      String JavaDoc wrappeeClassExpr,
123                      String JavaDoc wrappeeMethodExpr);
124
125    /**
126     * This configuration method makes all the matching methods
127     * invocations to be counted.
128     *
129     * @param name the name of the counter that is used (can be
130     * shared)
131     * @param wrappeeExpr a regular expression that matches the
132     * wrappee(s) name(s) that contain the method(s) to be counted
133     * @param wrappeeClassExpr a regular expression that matches the
134     * wrappee(s) class(es) name(s) that contain the method(s) to be
135     * counted
136     * @param wrappeeMethodExpr a regular expression that matches the
137     * method(s) to be counted (within the classes or objects denoted
138     * by the previous parameters)
139     * @see SimpleCountingWrapper
140     */

141
142    void addCounter(String JavaDoc name,
143                    String JavaDoc wrappeeExpr,
144                    String JavaDoc wrappeeClassExpr,
145                    String JavaDoc wrappeeMethodExpr);
146    
147    /**
148     * This configuration method makes all the matching methods
149     * invocations to be counted in an optimized fashion.
150     *
151     * @param name the name of the counter that is used (can be
152     * shared)
153     * @param wrappeeExpr a regular expression that matches the
154     * wrappee(s) name(s) that contain the method(s) to be counted
155     * @param wrappeeClassExpr a regular expression that matches the
156     * wrappee(s) class(es) name(s) that contain the method(s) to be
157     * counted
158     * @param wrappeeMethodExpr a regular expression that matches the
159     * method(s) to be counted (within the classes or objects denoted
160     * by the previous parameters)
161     * @param fieldName the name of the field that is used to optimize
162     * the counting (the counter is incremented with its value), an
163     * empty string has no effect
164     * @param argNumber the argument's index that is used to optimize
165     * the counting (the counter is incremented with its value), an
166     * empty string has no effect
167     * @see OptimizedCountingWrapper */

168
169    void addOptimizedCounter(String JavaDoc name,
170                             String JavaDoc wrappeeExpr,
171                             String JavaDoc wrappeeClassExpr,
172                             String JavaDoc wrappeeMethodExpr,
173                             String JavaDoc fieldName,
174                             String JavaDoc argNumber);
175
176 }
177
178
179
180
181
182
183
Popular Tags