Source Code Cross Referenced for CatchClauseRttiImpl.java in  » Net » Terracotta » com » tc » aspectwerkz » joinpoint » impl » 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.joinpoint.impl 
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.joinpoint.impl;
005:
006:        import com.tc.aspectwerkz.joinpoint.CatchClauseRtti;
007:        import com.tc.aspectwerkz.joinpoint.Rtti;
008:
009:        import java.lang.ref.WeakReference;
010:
011:        /**
012:         * Implementation for the catch clause RTTI.
013:         *
014:         * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
015:         */
016:        public class CatchClauseRttiImpl implements  CatchClauseRtti {
017:            private final CatchClauseSignatureImpl m_signature;
018:
019:            private WeakReference m_this Ref;
020:
021:            private WeakReference m_targetRef;
022:
023:            private Object m_parameterValue;
024:
025:            /**
026:             * Creates a new catch clause RTTI.
027:             *
028:             * @param signature
029:             * @param thisInstance
030:             * @param targetInstance
031:             */
032:            public CatchClauseRttiImpl(
033:                    final CatchClauseSignatureImpl signature,
034:                    final Object this Instance, final Object targetInstance) {
035:                m_signature = signature;
036:                m_this Ref = new WeakReference(this Instance);
037:                m_targetRef = new WeakReference(targetInstance);
038:            }
039:
040:            /**
041:             * Clones the RTTI instance.
042:             *
043:             * @param thisInstance
044:             * @param targetInstance
045:             * @return
046:             */
047:            public Rtti cloneFor(final Object this Instance,
048:                    final Object targetInstance) {
049:                return new CatchClauseRttiImpl(m_signature, this Instance,
050:                        targetInstance);
051:            }
052:
053:            /**
054:             * Returns the instance currently executing.
055:             *
056:             * @return the instance currently executing
057:             */
058:            public Object getThis() {
059:                return m_this Ref.get();
060:            }
061:
062:            /**
063:             * Returns the target instance.
064:             *
065:             * @return the target instance
066:             */
067:            public Object getTarget() {
068:                return m_targetRef.get();
069:            }
070:
071:            /**
072:             * Returns the declaring class.
073:             *
074:             * @return the declaring class
075:             */
076:            public Class getDeclaringType() {
077:                return m_signature.getDeclaringType();
078:            }
079:
080:            /**
081:             * Returns the modifiers for the signature. <p/>Could be used like this:
082:             * <p/>
083:             * <pre>
084:             * boolean isPublic = java.lang.reflect.Modifier.isPublic(signature.getModifiers());
085:             * </pre>
086:             *
087:             * @return the mofifiers
088:             */
089:            public int getModifiers() {
090:                return m_signature.getModifiers();
091:            }
092:
093:            /**
094:             * Returns the name (f.e. name of method of field).
095:             *
096:             * @return
097:             */
098:            public String getName() {
099:                return m_signature.getName();
100:            }
101:
102:            /**
103:             * Returns the parameter type.
104:             *
105:             * @return the parameter type
106:             */
107:            public Class getParameterType() {
108:                return m_signature.getParameterType();
109:            }
110:
111:            /**
112:             * Returns the value of the parameter.
113:             *
114:             * @return the value of the parameter
115:             */
116:            public Object getParameterValue() {
117:                return getTarget();//m_parameterValue;
118:            }
119:
120:            /**
121:             * Returns a string representation of the signature.
122:             *
123:             * @return a string representation
124:             * @TODO: implement toString to something meaningful
125:             */
126:            public String toString() {
127:                return super.toString();
128:            }
129:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.