Source Code Cross Referenced for MethodWrapperImpl.java in  » Code-Analyzer » hammurapi-3.20.0.3 » org » hammurapi » inspectors » metrics » callertrace » 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 » Code Analyzer » hammurapi 3.20.0.3 » org.hammurapi.inspectors.metrics.callertrace 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Hammurapi
003:         * Automated Java code review system.
004:         * Copyright (C) 2004  Johannes Bellert
005:         *
006:         * This program is free software; you can redistribute it and/or modify
007:         * it under the terms of the GNU General Public License as published by
008:         * the Free Software Foundation; either version 2 of the License, or
009:         *  (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:         * GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         *
020:         * URL: http://www.pavelvlasov.com/pv/content/menu.show?id=products.jtaste
021:         * e-Mail: Johannes.Bellert@ercgroup.com
022:         *
023:         *  * Created on Apr 18, 2004
024:         *
025:         */
026:        package org.hammurapi.inspectors.metrics.callertrace;
027:
028:        import com.pavelvlasov.jsel.JselException;
029:        import com.pavelvlasov.jsel.OperationInfo;
030:        import com.pavelvlasov.review.SourceMarker;
031:
032:        /**
033:         * @author Johannes Bellert
034:         *
035:         * To change the template for this generated type comment go to
036:         * Window - Preferences - Java - Code Generation - Code and Comments
037:         */
038:        public class MethodWrapperImpl {
039:            private String declaringType = "";
040:            // private SourceMarker srcMarker = null;
041:            private String sourceURL = "";
042:            private String srcLine = "1";
043:            private String name = "";
044:            private String signature = "";
045:            private int line = 0;
046:            private MethodWrapperDeclaration callerMethod = null;
047:            private boolean isTraced = false;
048:
049:            public MethodWrapperImpl(OperationInfo _method, SourceMarker srcMrk) {
050:                super ();
051:                // aMethod = _method;
052:                // name = _method.getName();
053:                signature = _method.getSignature();
054:                try {
055:                    declaringType = _method.getDeclaringType().getName()
056:                            .toString();
057:                } catch (JselException e) {
058:                    // TODO Auto-generated catch block
059:                    e.printStackTrace();
060:                }
061:                sourceURL = srcMrk.getSourceURL();
062:                srcLine = String.valueOf(srcMrk.getLine());
063:                line = srcMrk.getLine();
064:                // srcMarker = srcMrk;
065:            }
066:
067:            // only for Test Case usage !!
068:            public MethodWrapperImpl(String _name, String _declType) {
069:                super ();
070:                signature = _name;
071:                declaringType = _declType;
072:            }
073:
074:            //-- for initial search and test cases
075:            public MethodWrapperImpl(String _name) {
076:                super ();
077:                // aMethod = _method;
078:                name = _name;
079:                signature = _name;
080:                declaringType = "";
081:            }
082:
083:            public boolean equals(Object obj) {
084:                return this .getMethodKey().equals(
085:                        ((MethodWrapper) obj).getMethodKey());
086:            }
087:
088:            public boolean isTraced() {
089:                return isTraced;
090:            }
091:
092:            public void setTracedTrue() {
093:                isTraced = true;
094:            }
095:
096:            public String getDeclaringType() {
097:                return declaringType;
098:            }
099:
100:            /**
101:             * @return Returns the name.
102:             */
103:            public String getName() {
104:                return name;
105:            }
106:
107:            /**
108:             * @param name The name to set.
109:             */
110:            public void setName(String name) {
111:                this .name = name;
112:            }
113:
114:            /**
115:             * @return Returns the line.
116:             */
117:            public int getLine() {
118:                return line;
119:            }
120:
121:            public void setLine(int i) {
122:                line = i;
123:                return;
124:            }
125:
126:            public String getSrcURL() {
127:                return sourceURL;
128:            }
129:
130:            public String getSrcLine() {
131:                return srcLine;
132:            }
133:
134:            /**
135:             * @return Returns the signature.
136:             */
137:            public String getSignature() {
138:                return signature;
139:            }
140:
141:            /**
142:             * @return Returns the sourceURL.
143:             */
144:            public String getSourceURL() {
145:                return sourceURL;
146:            }
147:
148:            public String getMethodKey() {
149:                // return declaringType + ">>"+signature;
150:                StringBuffer sb = new StringBuffer();
151:                sb.append("(");
152:                sb.append(String.valueOf(this .hashCode()));
153:                sb.append(")");
154:                sb.append(declaringType);
155:                sb.append(">>");
156:                sb.append(signature);
157:                return sb.toString();
158:            }
159:
160:            public String printMethodName() {
161:                // return declaringType + ">>"+signature;
162:                StringBuffer sb = new StringBuffer();
163:
164:                sb.append(declaringType);
165:                sb.append(">>");
166:                sb.append(signature);
167:                return sb.toString();
168:            }
169:
170:            public String toSearchKey() {
171:                // return name;
172:                // return declaringType + ">>"+signature;
173:                StringBuffer sb = new StringBuffer();
174:                sb.append("(");
175:                sb.append(String.valueOf(this .hashCode()));
176:                sb.append(")");
177:                sb.append(declaringType);
178:                sb.append(">>");
179:                sb.append(signature);
180:                return sb.toString();
181:            }
182:
183:            public String toString() {
184:                // return this.getMethodKey();
185:                StringBuffer sb = new StringBuffer();
186:                sb.append(declaringType);
187:                sb.append(">>");
188:                sb.append(signature);
189:                return sb.toString();
190:            }
191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.