KickJava   Java API By Example, From Geeks To Geeks.

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


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

22
23 // $Id: JoinPoint.java,v 1.1.1.1 2003/07/02 15:30:50 apopovic Exp $
24
// =====================================================================
25
//
26
// (history at end)
27
//
28

29 package ch.ethz.jvmai;
30
31 import java.lang.reflect.Method JavaDoc;
32
33 /**
34  * Abstract class <code>JoinPoint</code> is the base-class
35  * for a set of JoinPoint-classes. Instances of this classes
36  * contain information about a joinpoint which has been
37  * reached during execution. The callback-methods in
38  * <code>JoinPointHook</code> receive such instances as
39  * arguments. They can then be used to retrieve additional
40  * information about the state of the VM when this
41  * join-point has been reached (e.g. local variables, name
42  * of the method currently beeing executed ...)
43  * <p>
44  * <b>Important</b> : Use only JoinPoint-objects provided by
45  * a JoinPointHook-method. Do not create them on your own
46  * <p>
47  * <b>Notice</b>: In addition to the data created by the
48  * aspect interface, this method compiles to the AspectJ
49  * API.
50  *
51  * @version $Revision: 1.1.1.1 $
52  * @author Andrei Popovici
53  */

54   public interface JoinPoint
55   {
56
57       /** Compliance with aspectj */
58       public Object JavaDoc[] getArgs();
59
60       /** Compliance with aspectj */
61       public Object JavaDoc getThis();
62
63       /** Compliance with aspectj */
64       public Object JavaDoc getTarget();
65
66       /** Compliance with aspectj */
67       public JoinPointStaticPart getStaticPart();
68
69       /** Compliance with aspectj */
70       public String JavaDoc getKind();
71
72       /** Compliance with aspectj */
73       public String JavaDoc toLongString() ;
74
75       /** Compliance with aspectj */
76       public String JavaDoc toShortString() ;
77
78       /** Compliance with aspectj */
79       public String JavaDoc toString() ;
80
81       /** Compliance with aspectj */
82       public Signature getSignature();
83
84     /** This method provides information similar to the
85      * AspectJ original getKind. The problem with getKind
86      * is that it works with strings, which is inefficient.
87      * We cannot override getKind -- Java is not
88      * zero-variant on results (at least until 1.4.*).
89      *
90      * @return one of the JoinPointKinds.MASK_XXX integer values
91      */

92     public int getMask();
93
94   }
95
96 //======================================================================
97
//
98
// $Log: JoinPoint.java,v $
99
// Revision 1.1.1.1 2003/07/02 15:30:50 apopovic
100
// Imported from ETH Zurich
101
//
102
// Revision 1.1 2003/05/05 14:02:27 popovici
103
// renaming from runes to prose
104
//
105
// Revision 1.7 2003/04/17 08:47:09 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.6 2003/03/04 11:27:07 popovici
116
// Important refactorization step (march):
117
// - removal of 'JoinPointEvents'; JoinPoints now have the same function as events
118
// - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM
119
// structures
120
//
121
// Revision 1.5 2002/03/28 13:48:28 popovici
122
// Mozilla-ified
123
//
124
// Revision 1.4 2002/02/13 12:25:05 smarkwal
125
// spaces/tabs alignment corrected
126
//
127
// Revision 1.3 2002/01/24 12:50:40 smarkwal
128
// Field 'klass' renamed to 'methodClass', because in FieldJoinPoint now exists a field 'fieldClass'. Comments added.
129
//
130
// Revision 1.2 2001/12/17 15:10:03 smarkwal
131
// added public to fields thread and frameId
132
//
133
// Revision 1.1 2001/12/14 15:01:16 smarkwal
134
// Initial Revision
135
//
136
Popular Tags