Source Code Cross Referenced for MethodEntryRequest.java in  » Byte-Code » PROSE » ch » ethz » prose » engine » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Byte Code » PROSE » ch.ethz.prose.engine 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //
002:        //  This file is part of the prose package.
003:        //
004:        //  The contents of this file are subject to the Mozilla Public License
005:        //  Version 1.1 (the "License"); you may not use this file except in
006:        //  compliance with the License. You may obtain a copy of the License at
007:        //  http://www.mozilla.org/MPL/
008:        //
009:        //  Software distributed under the License is distributed on an "AS IS" basis,
010:        //  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
011:        //  for the specific language governing rights and limitations under the
012:        //  License.
013:        //
014:        //  The Original Code is prose.
015:        //
016:        //  The Initial Developer of the Original Code is Andrei Popovici. Portions
017:        //  created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
018:        //  All Rights Reserved.
019:        //
020:        //  Contributor(s):
021:        // $Id: MethodEntryRequest.java,v 1.1.1.1 2003/07/02 15:30:51 apopovic Exp $
022:        // =====================================================================
023:        //
024:        // (history at end)
025:        //
026:
027:        package ch.ethz.prose.engine;
028:
029:        // used packages
030:        import java.lang.reflect.Method;
031:        import ch.ethz.jvmai.JoinPointKinds;
032:        import ch.ethz.jvmai.ClassSpecific;
033:
034:        /**
035:         * Class MethodEntryRequest is a special kind of
036:         * <code>JoinPointRequest</code> which, when inserted into a
037:         * <code>JoinPointManager</code> will make the local virtual
038:         * machine stop at the location it denotes. A corresponding
039:         * <code>MethodEntryEvent</code> will be posted to the listeners
040:         * registered in the join point manager.
041:         *
042:         * @version	$Revision: 1.1.1.1 $
043:         * @author	Andrei Popovici
044:         */
045:        public class MethodEntryRequest extends JoinPointRequest implements 
046:                JoinPointKinds, ClassSpecific {
047:
048:            private final Method method;
049:            private final Class methodClass;
050:
051:            public int getMask() {
052:                return MASK_METHOD_ENTRY_JP | MASK_CODE_JP;
053:            }
054:
055:            public String getKind() {
056:                return KIND_METHOD_ENTRY_JP;
057:            }
058:
059:            /**
060:             * Constructor.
061:             * @param m Method to set the watch at.
062:             * @param o Reference to the JoinPointManager to set and clear jvmai-watches.
063:             */
064:            public MethodEntryRequest(Method m, JoinPointManager o) {
065:                super (o);
066:                method = m;
067:                methodClass = method.getDeclaringClass();
068:            }
069:
070:            /**
071:             * Implements method from ClassSpecific
072:             */
073:            public Class getTargetClass() {
074:                return methodClass;
075:            }
076:
077:            /**
078:             * Implements method from MethodSpecific
079:             */
080:            public Method getMethod() {
081:                return method;
082:            }
083:
084:            protected void setWatch(Object listeners) {
085:                owner.getAspectInterface().setMethodEntryWatch(method,
086:                        listeners);
087:            }
088:
089:            protected void clearWatch() {
090:                owner.getAspectInterface().clearMethodEntryWatch(method);
091:            }
092:
093:            public boolean equals(Object other) {
094:                MethodEntryRequest otherReq;
095:                if (other instanceof  MethodEntryRequest)
096:                    otherReq = (MethodEntryRequest) other;
097:                else
098:                    return false;
099:                return method.equals(otherReq.method);
100:            }
101:
102:            // the plus 1 guarantees,
103:            // that a MethodExitRequest and MethodEntryRequest on the same Method don't have the same hashCode.
104:            public int hashCode() {
105:                return (getMethod().hashCode() + 1);
106:            }
107:
108:            public String toString() {
109:                return "MethodEntryRequest on " + methodClass.getName() + "."
110:                        + method.getName();
111:            }
112:
113:        }
114:
115:        //======================================================================
116:        //
117:        // $Log: MethodEntryRequest.java,v $
118:        // Revision 1.1.1.1  2003/07/02 15:30:51  apopovic
119:        // Imported from ETH Zurich
120:        //
121:        // Revision 1.3  2003/05/20 16:05:04  popovici
122:        //
123:        // New QueryManager replaces functionality in AspectManager (better Soc)
124:        // New 'Surrogate' classes for usage in the QueryManager
125:        // The 'RemoteAspectManager' and tools modified to use the Surrogates and the QueryManager
126:        //
127:        // Revision 1.2  2003/05/05 17:46:54  popovici
128:        // Refactorization step (runes->prose) cleanup
129:        //
130:        // Revision 1.1  2003/05/05 13:58:27  popovici
131:        // renaming from runes to prose
132:        //
133:        // Revision 1.9  2003/04/26 18:51:38  popovici
134:        // 1 Bug fix which lead to a refactoring step:
135:        //    1. the bug: 'JoinPointRequests' used to write to a static list, which survived a startup/teardown;
136:        //                now this list belongs to the JoinPointManager;
137:        //    2. the refactoring: the JoinPointManager now creates (and shares state) with join-points.
138:        //
139:        // Revision 1.8  2003/04/17 12:49:28  popovici
140:        // Refactoring of the crosscut package
141:        //  ExceptionCut renamed to ThrowCut
142:        //  McutSignature is now SignaturePattern
143:        //
144:        // Revision 1.7  2003/04/17 08:47:59  popovici
145:        // Important functionality additions
146:        //  - Cflow specializers
147:        //  - Restructuring of the MethodCut, SetCut, ThrowCut, and GetCut (they are much smaller)
148:        //  - Transactional capabilities
149:        //  - Total refactoring of Specializer evaluation, which permits fine-grained distinction
150:        //    between static and dynamic specializers.
151:        //  - Functionality pulled up in abstract classes
152:        //  - Uniformization of advice methods patterns and names
153:        //
154:        // Revision 1.6  2003/03/04 18:36:05  popovici
155:        // Organization of imprts
156:        //
157:        // Revision 1.5  2003/03/04 11:27:32  popovici
158:        // Important refactorization step (march):
159:        // - removal of 'JoinPointEvents'; JoinPoints now have the same function as events
160:        // - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM
161:        //   structures
162:        //
163:        // Revision 1.4  2003/01/27 12:46:41  pschoch
164:        // HashCode incremented by 1 so it differs from other JoinPointReqest types
165:        //
166:        // Revision 1.3  2002/03/28 13:48:51  popovici
167:        // Mozilla-ified
168:        //
169:        // Revision 1.2  2002/02/21 12:44:30  popovici
170:        // Dispatching efficiency issues:
171:        //     - Hook methods in the join point manager are now inlined (they
172:        //       do not use any more 'notifyListeners'
173:        //     - Aop tags are now of type 'ListenerList' which allows efficient
174:        //       array iteration
175:        //     - 'setWatch' methods modifiy to accomodate ListenerLists on EventRequests
176:        //
177:        // Revision 1.1  2002/02/05 10:03:49  smarkwal
178:        // BreakpointEvent and BreakpointRequest replaced by MethodEntry/MethodExit -Request and Event
179:        //
180:        // Revision 1.1.1.1  2001/11/29 18:13:12  popovici
181:        // Sources from runes
182:        //
183:        // Revision 1.1.2.6  2001/11/21 11:56:19  popovici
184:        //
185:        // -The sun.tools.agent and ch.ethz.inf.util.JVMDIUtil functionality
186:        // replaced with the iks.jvmdi package. References to this old
187:        // functionality replaced throughout the code.
188:        // -Partial reimplementation of the ch.ethz.inf.iks.runes classes,
189:        // part of their functionality moved to the ch.ethz.prose.reflect
190:        // abstract classes. New classes and functionality added to the
191:        // ch.ethz.prose.reflect package, partially to reflect the
192:        // more stable features taken from the iks.runes packages, partially
193:        // to reflect the structure of the VM (constant pool, etc). Functionality in
194:        // ch.ethz.prose.crosscut and the junit classes adapted to use the
195:        // new form of the ch.ethz.prose.reflect package
196:        //
197:        // Revision 1.1.2.5  2001/03/19 12:10:49  popovici
198:        // Constructor made public to allow Simulation tests.
199:        //
200:        // Revision 1.1.2.4  2001/02/21 13:20:33  popovici
201:        // method 'toString' change to be both more verbose and more executive
202:        //
203:        // Revision 1.1.2.3  2000/11/28 16:27:27  groos
204:        // Locatable interface has been removed. Instead, BreakpointRequest extends the interface LocationSpecific. The methods provided by LocationSpecific have been added and implemented.
205:        //
206:        // Revision 1.1.2.2  2000/10/23 19:05:52  popovici
207:        // import declaration changed according to refactorization DEVEL_WS0001;
208:        //
209:        // Revision 1.1.2.1  2000/10/16 13:04:36  popovici
210:        // Initial revision
211:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.