Source Code Cross Referenced for RuntimeEnvironment.java in  » Development » jode » jode » jvm » 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 » Development » jode » jode.jvm 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* RuntimeEnvironment Copyright (C) 1999-2002 Jochen Hoenicke.
002:         *
003:         * This program is free software; you can redistribute it and/or modify
004:         * it under the terms of the GNU Lesser General Public License as published by
005:         * the Free Software Foundation; either version 2, or (at your option)
006:         * any later version.
007:         *
008:         * This program is distributed in the hope that it will be useful,
009:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
010:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
011:         * GNU General Public License for more details.
012:         *
013:         * You should have received a copy of the GNU Lesser General Public License
014:         * along with this program; see the file COPYING.LESSER.  If not, write to
015:         * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
016:         *
017:         * $Id: RuntimeEnvironment.java,v 1.3.2.1 2002/05/28 17:34:12 hoenicke Exp $
018:         */
019:
020:        package jode.jvm;
021:
022:        import jode.bytecode.Reference;
023:        import java.lang.reflect.InvocationTargetException;
024:
025:        /**
026:         * This interface is used by the Interpreter to actually modify objects,
027:         * invoke methods, etc. <br>
028:         *
029:         * The objects used in this runtime environment need not to be of the
030:         * real type, but can be some other type of your choice.  But some
031:         * mappings must be preserved, since they are used inside the
032:         * Interpreter:
033:         * <ul> <li>boolean, byte, short, char and int are mapped to Integer. </li>
034:         * <li> float, long, double are mapped to Float, Long, Double resp. </li>
035:         * <li> array of primitive type is mapped to itself (not array of Integer)</li>
036:         * <li> array of other types are mapped to array of mapped other type </li>
037:         * </ul>
038:         * 
039:         * @author Jochen Hoenicke */
040:        public interface RuntimeEnvironment {
041:            /**
042:             * Get the value of a field member.
043:             * @param fieldref the Reference of the field.
044:             * @param obj the object of which the field should be taken, null
045:             * if the field is static.
046:             * @return the field value.  Primitive types are wrapped to 
047:             * Object.
048:             * @exception InterpreterException if the field does not exists, the
049:             * object is not supported etc.
050:             */
051:            public Object getField(Reference fieldref, Object obj)
052:                    throws InterpreterException;
053:
054:            /**
055:             * Set the value of a field member.
056:             * @param fieldref the Reference of the field.
057:             * @param obj the object of which the field should be taken, null
058:             * if the field is static.
059:             * @param value the field value.  Primitive types are wrapped to 
060:             * Object.
061:             * @exception InterpreterException if the field does not exists, the
062:             * object is not supported etc.
063:             */
064:            public void putField(Reference fieldref, Object obj, Object value)
065:                    throws InterpreterException;
066:
067:            /**
068:             * Invoke a method.
069:             * @param methodRef the reference to the method.
070:             * @param isVirtual true, iff the call is virtual
071:             * @param cls the object on which the method should be called, null
072:             * if the method is static.
073:             * @param params the params of the method.
074:             * @return the return value of the method.  Void type is ignored,
075:             * may be null.
076:             * @exception InterpreterException if the field does not exists, the
077:             * object is not supported etc.  */
078:            public Object invokeMethod(Reference methodRef, boolean isVirtual,
079:                    Object cls, Object[] params) throws InterpreterException,
080:                    InvocationTargetException;
081:
082:            /**
083:             * Create a new instance of an object.
084:             * @param methodRef the reference of the constructor to invoke
085:             * @param params the params of the method.
086:             * @return the new object.
087:             */
088:            public Object invokeConstructor(Reference methodRef, Object[] params)
089:                    throws InterpreterException, InvocationTargetException;
090:
091:            /**
092:             * Check if obj is an instance of className
093:             * @param className the type signature of the class.
094:             * @return true, if obj is an instance of className, false otherwise.
095:             */
096:            public boolean instanceOf(Object obj, String className)
097:                    throws InterpreterException;
098:
099:            /**
100:             * Create a new multidimensional Array.
101:             * @param type the type of the elements.
102:             * @param dimensions the size in every dimension.
103:             * @return the new array (this must be an array, see class comment).
104:             */
105:            public Object newArray(String type, int[] dimensions)
106:                    throws InterpreterException;
107:
108:            /**
109:             * Enter a monitor.
110:             * @param object the object whose monitor should be taken.
111:             */
112:            public void enterMonitor(Object obj) throws InterpreterException;
113:
114:            /**
115:             * Exit a monitor.
116:             * @param object the object whose monitor should be freed.
117:             */
118:            public void exitMonitor(Object obj) throws InterpreterException;
119:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.