Source Code Cross Referenced for EmittedJoinPoint.java in  » Net » Terracotta » com » tc » aspectwerkz » transform » inlining » 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 » Net » Terracotta » com.tc.aspectwerkz.transform.inlining 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice.  All rights reserved.
003:         */
004:        package com.tc.aspectwerkz.transform.inlining;
005:
006:        import com.tc.asm.Label;
007:
008:        import com.tc.aspectwerkz.joinpoint.management.JoinPointType;
009:        import com.tc.aspectwerkz.transform.InstrumentationContext;
010:
011:        /**
012:         * A structure that keeps required information needed to regenerate a JIT joinpoint. The weaver emits this
013:         * information so that we can add initalization code to the weaved class. Note that EmittedJP are really Emitted -
014:         * and can be a subset of actual JP (f.e. call, where information is lost in between each weave phase).
015:         * <p/>
016:         * FIXME equals and hashcode are wrong if 2 JP in same withincode - should depend on line number f.e. but that won't
017:         * even be enough. Muts have a static variable and trust that creation of EmittedJP is ok.
018:         * Check where those are used in a map for hashcode / equals to be used.
019:         *
020:         * @author <a href="mailto:alex@gnilux.com">Alexandre Vasseur </a>
021:         * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
022:         */
023:        public final class EmittedJoinPoint {
024:
025:            public final static Label NO_LINE_NUMBER = new Label();
026:
027:            private final int joinPointType;
028:            private final String callerClassName;
029:            private final String callerMethodName;
030:            private final String callerMethodDesc;
031:            private final int callerMethodModifiers;
032:            private final String calleeClassName;
033:            private final String calleeMemberName;
034:            private final String calleeMemberDesc;
035:            private final int calleeMemberModifiers;
036:            private final int joinPointHash;
037:            private final String joinPointClassName;
038:            private final Label lineNumberLabel;
039:
040:            /**
041:             * Line number for call / getDefault / set / handler joinpoint
042:             * The lineNumber is 0 unless available and resolveLineNumber(Context) has been called.
043:             */
044:            private int lineNumber = 0;
045:
046:            /**
047:             * Creates a new instance.
048:             *
049:             * @param joinPointType
050:             * @param callerClassName
051:             * @param callerMethodName
052:             * @param callerMethodDesc
053:             * @param callerMethodModifiers
054:             * @param calleeClassName
055:             * @param calleeMemberName
056:             * @param calleeMemberDesc
057:             * @param calleeMemberModifiers
058:             * @param joinPointHash
059:             * @param joinPointClassName
060:             * @param lineNumberLabel
061:             */
062:            public EmittedJoinPoint(final int joinPointType,
063:                    final String callerClassName,
064:                    final String callerMethodName,
065:                    final String callerMethodDesc,
066:                    final int callerMethodModifiers,
067:                    final String calleeClassName,
068:                    final String calleeMemberName,
069:                    final String calleeMemberDesc,
070:                    final int calleeMemberModifiers, final int joinPointHash,
071:                    final String joinPointClassName, final Label lineNumberLabel) {
072:                this .joinPointType = joinPointType;
073:                this .callerClassName = callerClassName;
074:                this .callerMethodName = callerMethodName;
075:                this .callerMethodDesc = callerMethodDesc;
076:                this .callerMethodModifiers = callerMethodModifiers;
077:                this .calleeClassName = calleeClassName;
078:                this .calleeMemberName = calleeMemberName;
079:                this .calleeMemberDesc = calleeMemberDesc;
080:                this .calleeMemberModifiers = calleeMemberModifiers;
081:                this .joinPointHash = joinPointHash;
082:                this .joinPointClassName = joinPointClassName;
083:                this .lineNumberLabel = lineNumberLabel;
084:            }
085:
086:            /**
087:             * Creates a new instance.
088:             *
089:             * @param joinPointType
090:             * @param callerClassName
091:             * @param callerMethodName
092:             * @param callerMethodDesc
093:             * @param callerMethodModifiers
094:             * @param calleeClassName
095:             * @param calleeMemberName
096:             * @param calleeMemberDesc
097:             * @param calleeMemberModifiers
098:             * @param joinPointHash
099:             * @param joinPointClassName
100:             */
101:            public EmittedJoinPoint(final int joinPointType,
102:                    final String callerClassName,
103:                    final String callerMethodName,
104:                    final String callerMethodDesc,
105:                    final int callerMethodModifiers,
106:                    final String calleeClassName,
107:                    final String calleeMemberName,
108:                    final String calleeMemberDesc,
109:                    final int calleeMemberModifiers, final int joinPointHash,
110:                    final String joinPointClassName) {
111:                this (joinPointType, callerClassName, callerMethodName,
112:                        callerMethodDesc, callerMethodModifiers,
113:                        calleeClassName, calleeMemberName, calleeMemberDesc,
114:                        calleeMemberModifiers, joinPointHash,
115:                        joinPointClassName, NO_LINE_NUMBER);
116:            }
117:
118:            public int getJoinPointType() {
119:                return joinPointType;
120:            }
121:
122:            public String getCallerClassName() {
123:                return callerClassName;
124:            }
125:
126:            public String getCallerMethodName() {
127:                return callerMethodName;
128:            }
129:
130:            public String getCallerMethodDesc() {
131:                return callerMethodDesc;
132:            }
133:
134:            public int getCallerMethodModifiers() {
135:                return callerMethodModifiers;
136:            }
137:
138:            public String getCalleeClassName() {
139:                return calleeClassName;
140:            }
141:
142:            public String getCalleeMemberName() {
143:                return calleeMemberName;
144:            }
145:
146:            public String getCalleeMemberDesc() {
147:                return calleeMemberDesc;
148:            }
149:
150:            public int getCalleeMemberModifiers() {
151:                return calleeMemberModifiers;
152:            }
153:
154:            public int getJoinPointHash() {
155:                return joinPointHash;
156:            }
157:
158:            public String getJoinPointClassName() {
159:                return joinPointClassName;
160:            }
161:
162:            public int getLineNumber() {
163:                return lineNumber;
164:            }
165:
166:            public void resolveLineNumber(InstrumentationContext context) {
167:                lineNumber = context.resolveLineNumberInfo(lineNumberLabel);
168:            }
169:
170:            public boolean equals(Object o) {
171:                if (this  == o) {
172:                    return true;
173:                }
174:                if (!(o instanceof  EmittedJoinPoint)) {
175:                    return false;
176:                }
177:
178:                final EmittedJoinPoint emittedJoinPoint = (EmittedJoinPoint) o;
179:
180:                if (calleeMemberModifiers != emittedJoinPoint.calleeMemberModifiers) {
181:                    return false;
182:                }
183:                if (callerMethodModifiers != emittedJoinPoint.callerMethodModifiers) {
184:                    return false;
185:                }
186:                if (joinPointHash != emittedJoinPoint.joinPointHash) {
187:                    return false;
188:                }
189:                if (joinPointType != emittedJoinPoint.joinPointType) {
190:                    return false;
191:                }
192:                if (!calleeClassName.equals(emittedJoinPoint.calleeClassName)) {
193:                    return false;
194:                }
195:                if (!calleeMemberDesc.equals(emittedJoinPoint.calleeMemberDesc)) {
196:                    return false;
197:                }
198:                if (!calleeMemberName.equals(emittedJoinPoint.calleeMemberName)) {
199:                    return false;
200:                }
201:                if (!callerClassName.equals(emittedJoinPoint.callerClassName)) {
202:                    return false;
203:                }
204:                if (!callerMethodDesc.equals(emittedJoinPoint.callerMethodDesc)) {
205:                    return false;
206:                }
207:                if (!callerMethodName.equals(emittedJoinPoint.callerMethodName)) {
208:                    return false;
209:                }
210:                if (!joinPointClassName
211:                        .equals(emittedJoinPoint.joinPointClassName)) {
212:                    return false;
213:                }
214:
215:                return true;
216:            }
217:
218:            public int hashCode() {
219:                int result;
220:                result = joinPointType;
221:                result = 29 * result + callerClassName.hashCode();
222:                result = 29 * result + callerMethodName.hashCode();
223:                result = 29 * result + callerMethodDesc.hashCode();
224:                result = 29 * result + callerMethodModifiers;
225:                result = 29 * result + calleeClassName.hashCode();
226:                result = 29 * result + calleeMemberName.hashCode();
227:                result = 29 * result + calleeMemberDesc.hashCode();
228:                result = 29 * result + calleeMemberModifiers;
229:                result = 29 * result + joinPointHash;
230:                result = 29 * result + joinPointClassName.hashCode();
231:                return result;
232:            }
233:
234:            public String toString() {
235:                StringBuffer sb = new StringBuffer();
236:                sb.append(JoinPointType.fromInt(getJoinPointType()).toString());
237:                sb.append(" , caller ");
238:                sb.append(getCallerClassName());
239:                sb.append('.').append(getCallerMethodName());
240:                sb.append(getCallerMethodDesc());
241:                sb.append(" , callee ");
242:                sb.append(getCalleeClassName());
243:                sb.append('.').append(getCalleeMemberName());
244:                sb.append(' ').append(getCalleeMemberDesc());
245:                sb.append(" , line ").append(getLineNumber());
246:                return sb.toString();
247:            }
248:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.