Source Code Cross Referenced for CodeJoinPointImpl.java in  » Byte-Code » PROSE » ch » ethz » inf » iks » jvmai » jvmdi » 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.inf.iks.jvmai.jvmdi 
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: CodeJoinPointImpl.java,v 1.1.1.1 2003/07/02 15:30:50 apopovic Exp $
022:        // =====================================================================
023:        //
024:        // (history at end)
025:        //
026:
027:        package ch.ethz.inf.iks.jvmai.jvmdi;
028:
029:        import java.lang.reflect.Method;
030:        import ch.ethz.jvmai.JoinPointStaticPart;
031:        import ch.ethz.jvmai.CodeJoinPoint;
032:        import ch.ethz.jvmai.Signature;
033:        import ch.ethz.jvmai.JoinPointKinds;
034:
035:        public class CodeJoinPointImpl implements  CodeJoinPoint,
036:                JoinPointStaticPart, JoinPointKinds {
037:            protected Signature signature; // set
038:            protected JoinPointContext context; //
039:            protected Object aopTag;
040:            protected ControlFlow cflow;
041:            protected Object target;
042:
043:            protected CodeJoinPointImpl(ControlFlow cflow) {
044:                //      if (cflow == null) // FIXME!!
045:                //throw new IllegalArgumentException("CodeJoinPointImpl.<init>: cflow must be non-null");
046:                this .context = new JoinPointContext();
047:                this .signature = new CodeSignatureImpl(this );
048:                this .target = null;
049:                this .cflow = cflow;
050:            }
051:
052:            protected CodeJoinPointImpl(ControlFlow cflow, JoinPointContext ctx) {
053:                //if (cflow == null)
054:                ///throw new IllegalArgumentException("CodeJoinPointImpl.<init>: cflow must be non-null");
055:                this .context = ctx;
056:                this .signature = new CodeSignatureImpl(this );
057:                this .target = null;
058:                this .cflow = cflow;
059:            }
060:
061:            public boolean equals(Object other) {
062:
063:                if (other instanceof  CodeJoinPointImpl)
064:                    return context.location
065:                            .equals(((CodeJoinPointImpl) other).context.location);
066:                else
067:                    return false;
068:            }
069:
070:            public int hashCode() {
071:                return context.location.hashCode();
072:            }
073:
074:            /**
075:             * Contains the method beeing executed
076:             * when this joinpoint has been reached.
077:             */
078:            public Method getMethod() {
079:                return context.location.executingMethod;
080:            }
081:
082:            /** The byteCodeIndex of this joinPoint.
083:             */
084:            public int getByteCodeIndex() {
085:                return context.location.executingBci;
086:            }
087:
088:            /** Return the arguments at this join-point.
089:             * @return the arguments at this join-point
090:             */
091:            public Object[] getArgs() {
092:                return context.getArgs();
093:            }
094:
095:            public String getKind() {
096:                return CodeJoinPoint.KIND;
097:            }
098:
099:            public int getMask() {
100:                return JoinPointKinds.MASK_CODE_JP;
101:            }
102:
103:            /**
104:             * Return the object executing this joinpoint.
105:             */
106:            public Object getThis() {
107:                return context.getThis();
108:            }
109:
110:            /** Return the target object of this joinpoint
111:             */
112:            public Object getTarget() {
113:                return target;
114:            }
115:
116:            /** Return the signature of this object
117:             */
118:            public Signature getSignature() {
119:                return signature;
120:            }
121:
122:            /** Return the enclosing join-point.
123:             */
124:            public CodeJoinPoint getEnclosingJoinPoint() {
125:                CodeJoinPointImpl result = new CodeJoinPointImpl(cflow, context
126:                        .callerContext());
127:                result.target = getThis();
128:                return result;
129:            }
130:
131:            public String toShortString() {
132:                return getMethod().toString() + "@" + getByteCodeIndex();
133:            }
134:
135:            public String toLongString() {
136:                return getMethod().toString() + "@" + getByteCodeIndex();
137:            }
138:
139:            public String toString() {
140:                return toShortString();
141:            }
142:
143:            /**
144:             * Contains a user-defined object. This object has been
145:             * supplied during registration of this joinpoint.
146:             */
147:            public Object getAopTag() {
148:                return aopTag;
149:            }
150:
151:            /* Return the list of tags beloning to join-points
152:             * in this control flow. The first tag is always
153:             * the one that can be obtained through <code>getAopTag</code>.
154:             *
155:             */
156:            public java.util.Collection getCflowTags() {
157:                return cflow.getAopTags(this );
158:            }
159:
160:            public JoinPointStaticPart getStaticPart() {
161:                return this ;
162:            }
163:
164:        }
165:
166:        //======================================================================
167:        //
168:        // $Log: CodeJoinPointImpl.java,v $
169:        // Revision 1.1.1.1  2003/07/02 15:30:50  apopovic
170:        // Imported from ETH Zurich
171:        //
172:        // Revision 1.3  2003/05/05 17:46:22  popovici
173:        // Refactorization step (runes->prose) cleanup
174:        //
175:        // Revision 1.2  2003/04/17 08:47:02  popovici
176:        // Important functionality additions
177:        //  - Cflow specializers
178:        //  - Restructuring of the MethodCut, SetCut, ExceptionCut, and GetCut (they are much smaller)
179:        //  - Transactional capabilities
180:        //  - Total refactoring of Specializer evaluation, which permits fine-grained distinction
181:        //    between static and dynamic specializers.
182:        //  - Functionality pulled up in abstract classes
183:        //  - Uniformization of advice methods patterns and names
184:        //
185:        // Revision 1.1  2003/03/04 11:26:21  popovici
186:        // Important refactorization step (march):
187:        // - removal of 'JoinPointEvents'; JoinPoints now have the same function as events
188:        // - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM
189:        //   structures
190:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.