KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > jvmai > CodeJoinPoint


1 //
2
// This file is part of the prose package.
3
//
4
// The contents of this file are subject to the Mozilla Public License
5
// Version 1.1 (the "License"); you may not use this file except in
6
// compliance with the License. You may obtain a copy of the License at
7
// http://www.mozilla.org/MPL/
8
//
9
// Software distributed under the License is distributed on an "AS IS" basis,
10
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
// for the specific language governing rights and limitations under the
12
// License.
13
//
14
// The Original Code is prose.
15
//
16
// The Initial Developer of the Original Code is Andrei Popovici. Portions
17
// created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
18
// All Rights Reserved.
19
//
20
// Contributor(s):
21
package ch.ethz.jvmai;
22
23 import java.lang.reflect.Method JavaDoc;
24 import java.util.Collection JavaDoc;
25
26 /** Code Join Points are join-points that can occur within the
27  * execution of a method. They can be arbitrary points within the
28  * bytecode of a method.
29  */

30 public interface CodeJoinPoint extends JoinPoint
31 {
32     public static String JavaDoc KIND = JoinPointKinds.KIND_CODE_JP;
33
34       /**
35        * Contains the method beeing executed
36        * when this joinpoint has been reached. For MethodEntry Join Points
37        * and method exit join points, methods captured statically and
38        * the method being currently executed coincide. Therefore, for such
39        * joinoints, the signature of the method returned by <code>getMethod</code>
40        * and the one returned by <code>getJoinPointStaticPart().getSignature()</code>
41        * are the same. This is not the case with
42        * Exception Throws, catche Field access & modifications join points.
43        */

44       public Method JavaDoc getMethod();
45
46       /** The byteCodeIndex of this joinPoint.
47        */

48       public int getByteCodeIndex();
49
50
51       /** Return the enclosing join-point. The enclosing join-point is join-point of the <em>calling frame</em>.
52        * For instance, if <em>a</em> calls <em>b</em> and <em>x</em> is the method entry join point in b,
53        * <em>x.getEnclosingJoinPoint</em> is the point in the execution of the same thread within
54        * <em>a</em>'s frame where the invocation to be is done.
55        * <p>
56        * If if <em>a</em> calls <em>b</em> and within <em>b</em> the join-point <em>y</em> is a field
57        * set join point, then <em>x.getEnclsingJoinPoint()</em> and <em>y.getEnclosingJoinPoint()</em>
58        * denote the same join point within a's frame.
59        */

60       public CodeJoinPoint getEnclosingJoinPoint();
61
62       /**
63        * Contains a user-defined object. This object has been
64        * supplied during registration of this joinpoint.
65        */

66        public Object JavaDoc getAopTag();
67
68 }
69
Popular Tags