Source Code Cross Referenced for VMField.java in  » Apache-Harmony-Java-SE » java-package » java » lang » reflect » 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 » Apache Harmony Java SE » java package » java.lang.reflect 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:        /**
018:         * @author Alexey V. Varlamov 
019:         * @version $Revision$
020:         */package java.lang.reflect;
021:
022:        final class VMField {
023:
024:            /**
025:             * This class is not supposed to be instantiated.
026:             */
027:            private VMField() {
028:            }
029:
030:            /**
031:             * Obtaines a value of the field with specified identifier. If the
032:             * <code>id</code> argument corresponds to a static field then the
033:             * <code>object</code> argument must be null. The value of a static field
034:             * will be returned in this case. If the <code>id</code> argument
035:             * corresponds to non-static field then object's field value will be
036:             * returned.
037:             * <p>
038:             * This method is used for the {@link Field#get(Object) Field.get(Object obj)}
039:             * method implementation.
040:             * <p>
041:             * 
042:             * @param object the object to get a field value from.
043:             * @param id an identifier of the caller class.
044:             * @return a value of the object. The values of primitive type are wrapped
045:             *         by corresponding object from the <code>java.lang</code> package.
046:             * @throws ExceptionInInitializerError if initialization fails.
047:             * @api2vm
048:             */
049:            static native Object getObject(Object object, long field_id);
050:
051:            static native boolean getBoolean(Object object, long field_id);
052:
053:            static native char getChar(Object object, long field_id);
054:
055:            static native byte getByte(Object object, long field_id);
056:
057:            static native short getShort(Object object, long field_id);
058:
059:            static native int getInt(Object object, long field_id);
060:
061:            static native long getLong(Object object, long field_id);
062:
063:            static native float getFloat(Object object, long field_id);
064:
065:            static native double getDouble(Object object, long field_id);
066:
067:            /**
068:             * Sets a value for the field with specified identifier. If the
069:             * <code>id</code> argument corresponds to a static field then the
070:             * <code>object</code> argument must be null. An attempt to set a new value
071:             * to a static field will be made in this case. If the <code>id</code>
072:             * argument corresponds to a non-static field then an attempt to assign new 
073:             * value to object's field will be made.
074:             * <p>
075:             * This method is used for the {@link Field#set(Object, Object)
076:             * Field.set(Object obj, Object value)} method implementation.
077:             * <p>
078:             * 
079:             * @param object the object to set a field value in.
080:             * @param id an identifier of the caller class.
081:             * @param value a new field value. If the field has primitive type then the
082:             *        value argument should be unwrapped.
083:             * @throws ExceptionInInitializerError if initialization fails.
084:             * @api2vm
085:             */
086:            static native void setObject(Object object, long field_id,
087:                    Object value);
088:
089:            static native void setBoolean(Object object, long field_id,
090:                    boolean value);
091:
092:            static native void setChar(Object object, long field_id, char value);
093:
094:            static native void setByte(Object object, long field_id, byte value);
095:
096:            static native void setShort(Object object, long field_id,
097:                    short value);
098:
099:            static native void setInt(Object object, long field_id, int value);
100:
101:            static native void setLong(Object object, long field_id, long value);
102:
103:            static native void setFloat(Object object, long field_id,
104:                    float value);
105:
106:            static native void setDouble(Object object, long field_id,
107:                    double value);
108:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.