Source Code Cross Referenced for FieldJoinPointImpl.java in  » Byte-Code » PROSE » ch » ethz » prose » jvmai » jikesrvm » advice_weaver » 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.jvmai.jikesrvm.advice_weaver 
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 Angela Nicoara. Portions
017:        //  created by Angela Nicoara are Copyright (C) 2002 Angela Nicoara.
018:        //  All Rights Reserved.
019:        //
020:        //  Contributor(s):
021:        //  $Id$
022:        //  =====================================================================
023:        //
024:        //  (history at end)
025:        //
026:
027:        package ch.ethz.prose.jvmai.jikesrvm.advice_weaver;
028:
029:        import java.lang.reflect.Field;
030:
031:        import ch.ethz.jvmai.FieldJoinPoint;
032:
033:        import com.ibm.JikesRVM.classloader.*;
034:
035:        /**
036:         * Concrete implementation of a CodeJoinPoint for the Jikes RVM.
037:         * 
038:         * @version $Revision$
039:         * @author 	Johann Gyger
040:         * @author	Angela Nicoara
041:         */
042:        public class FieldJoinPointImpl extends CodeJoinPointImpl implements 
043:                FieldJoinPoint {
044:
045:            /**
046:             * Field identifier to which this join point belongs.
047:             */
048:            public int fieldId;
049:
050:            /**
051:             * Field to which this join point belongs.
052:             */
053:            public Field field;
054:
055:            /**
056:             * Owner of `field'.
057:             */
058:            public Object owner;
059:
060:            /**
061:             * Field value for `owner';
062:             */
063:            public Object value;
064:
065:            public void init(int id, Object tag, Object this 0, Object[] args,
066:                    int fieldId, Object owner) {
067:                init(id, tag, this 0, args);
068:                this .fieldId = fieldId;
069:                field = null;
070:                this .owner = owner;
071:                value = null;
072:            }
073:
074:            /**
075:             * The target of a field join point differs from the target of a code join
076:             * point: It is actually the owner of the field. See
077:             * {@link com.ibm.JikesRVM.VM_JVMAI#getFieldTarget()}for more information.
078:             */
079:            public Object getTarget() {
080:                return owner;
081:            }
082:
083:            public Field getField() {
084:                if (field == null) {
085:                    VM_Field f = VM_FieldReference.getMemberRef(fieldId)
086:                            .asFieldReference().resolve();
087:                    return java.lang.reflect.JikesRVMSupport.createField(f);
088:                }
089:
090:                return field;
091:            }
092:
093:            public Object getValue() {
094:                if (value == null) {
095:                    VM_Field f = VM_FieldReference.getMemberRef(fieldId)
096:                            .asFieldReference().resolve();
097:                    VM_TypeReference type = f.getType();
098:                    if (type.isReferenceType()) {
099:                        value = f.getObjectValueUnchecked(owner);
100:                    } else if (type.isCharType()) {
101:                        value = new Character(f.getCharValueUnchecked(owner));
102:                    } else if (type.isDoubleType()) {
103:                        value = new Double(f.getDoubleValueUnchecked(owner));
104:                    } else if (type.isFloatType()) {
105:                        value = new Float(f.getFloatValueUnchecked(owner));
106:                    } else if (type.isLongType()) {
107:                        value = new Long(f.getLongValueUnchecked(owner));
108:                    } else if (type.isIntType()) {
109:                        value = new Integer(f.getIntValueUnchecked(owner));
110:                    } else if (type.isShortType()) {
111:                        value = new Short(f.getShortValueUnchecked(owner));
112:                    } else if (type.isByteType()) {
113:                        value = new Byte(f.getByteValueUnchecked(owner));
114:                    } else if (type.isBooleanType()) {
115:                        value = new Boolean(f.getBooleanValueUnchecked(owner));
116:                    } else {
117:                        throw new InternalError(
118:                                "Huh?  Field of unknown primitive type " + type);
119:                    }
120:                }
121:
122:                return value;
123:            }
124:
125:        }
126:
127:        //======================================================================
128:        //
129:        // $Log$
130:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.