Source Code Cross Referenced for LongLoadInstructionFactory.java in  » Development » jdec » net » sf » jdec » jvminstructions » factory » 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 » jdec » net.sf.jdec.jvminstructions.factory 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.sf.jdec.jvminstructions.factory;
002:
003:        import java.util.Map;
004:
005:        import net.sf.jdec.core.JvmOpCodes;
006:        import net.sf.jdec.jvminstructions.commandholders.D2L;
007:        import net.sf.jdec.jvminstructions.commandholders.F2L;
008:        import net.sf.jdec.jvminstructions.commandholders.IInstructionCommandHolder;
009:        import net.sf.jdec.jvminstructions.commandholders.LADD;
010:        import net.sf.jdec.jvminstructions.commandholders.Laload;
011:        import net.sf.jdec.jvminstructions.commandholders.Land;
012:        import net.sf.jdec.jvminstructions.commandholders.Lcmp;
013:        import net.sf.jdec.jvminstructions.commandholders.Lconst_0;
014:        import net.sf.jdec.jvminstructions.commandholders.Lconst_1;
015:        import net.sf.jdec.jvminstructions.commandholders.Ldc;
016:        import net.sf.jdec.jvminstructions.commandholders.Ldc2_w;
017:        import net.sf.jdec.jvminstructions.commandholders.Ldc_w;
018:        import net.sf.jdec.jvminstructions.commandholders.Ldiv;
019:        import net.sf.jdec.jvminstructions.commandholders.Lload;
020:        import net.sf.jdec.jvminstructions.commandholders.Lload_0;
021:        import net.sf.jdec.jvminstructions.commandholders.Lload_1;
022:        import net.sf.jdec.jvminstructions.commandholders.Lload_2;
023:        import net.sf.jdec.jvminstructions.commandholders.Lload_3;
024:        import net.sf.jdec.jvminstructions.commandholders.Lmul;
025:        import net.sf.jdec.jvminstructions.commandholders.Lneg;
026:        import net.sf.jdec.jvminstructions.commandholders.Lor;
027:        import net.sf.jdec.jvminstructions.commandholders.Lrem;
028:        import net.sf.jdec.jvminstructions.commandholders.Lshl;
029:        import net.sf.jdec.jvminstructions.commandholders.Lshr;
030:        import net.sf.jdec.jvminstructions.commandholders.Lsub;
031:        import net.sf.jdec.jvminstructions.commandholders.Lushr;
032:        import net.sf.jdec.jvminstructions.commandholders.Lxor;
033:        import net.sf.jdec.jvminstructions.util.InstrConstants;
034:
035:        /*
036:         *  LongLoadInstructionFactory.java Copyright (c) 2006,07 Swaroop Belur
037:         *
038:         * This program is free software; you can redistribute it and/or
039:         * modify it under the terms of the GNU General Public License
040:         * as published by the Free Software Foundation; either version 2
041:         * of the License, or (at your option) any later version.
042:
043:         * This program is distributed in the hope that it will be useful,
044:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
045:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
046:         * GNU General Public License for more details.
047:
048:         * You should have received a copy of the GNU General Public License
049:         * along with this program; if not, write to the Free Software
050:         * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
051:         *
052:         */
053:        public class LongLoadInstructionFactory implements  IInstructionFactory {
054:
055:            public IInstructionCommandHolder newInstance(Map parameters) {
056:
057:                Integer temp = (Integer) parameters
058:                        .get(InstrConstants.OPCODE_TYPE);
059:                if (temp == null) {
060:                    throw new IllegalArgumentException(
061:                            "Opcode type cannot be null");
062:                }
063:
064:                int opcodevalue = temp.intValue();
065:                switch (opcodevalue) {
066:
067:                case JvmOpCodes.D2L:
068:                    return new D2L();
069:
070:                case JvmOpCodes.F2L:
071:                    return new F2L();
072:
073:                case JvmOpCodes.LADD:
074:                    return new LADD();
075:
076:                case JvmOpCodes.LALOAD:
077:                    return new Laload();
078:
079:                case JvmOpCodes.LAND:
080:                    return new Land();
081:
082:                case JvmOpCodes.LCMP:
083:                    return new Lcmp();
084:
085:                case JvmOpCodes.LCONST_0:
086:                    return new Lconst_0();
087:
088:                case JvmOpCodes.LCONST_1:
089:                    return new Lconst_1();
090:
091:                case JvmOpCodes.LDC:
092:                    return new Ldc();
093:
094:                case JvmOpCodes.LDC_W:
095:                    return new Ldc_w();
096:
097:                case JvmOpCodes.LDC2_W:
098:                    return new Ldc2_w();
099:
100:                case JvmOpCodes.LLOAD:
101:                    return new Lload();
102:
103:                case JvmOpCodes.LDIV:
104:                    return new Ldiv();
105:
106:                case JvmOpCodes.LLOAD_0:
107:                    return new Lload_0();
108:
109:                case JvmOpCodes.LLOAD_1:
110:                    return new Lload_1();
111:
112:                case JvmOpCodes.LLOAD_2:
113:                    return new Lload_2();
114:
115:                case JvmOpCodes.LLOAD_3:
116:                    return new Lload_3();
117:
118:                case JvmOpCodes.LMUL:
119:                    return new Lmul();
120:
121:                case JvmOpCodes.LNEG:
122:                    return new Lneg();
123:
124:                case JvmOpCodes.LREM:
125:                    return new Lrem();
126:
127:                case JvmOpCodes.LOR:
128:                    return new Lor();
129:
130:                case JvmOpCodes.LSHL:
131:                    return new Lshl();
132:
133:                case JvmOpCodes.LSHR:
134:                    return new Lshr();
135:
136:                case JvmOpCodes.LUSHR:
137:                    return new Lushr();
138:
139:                case JvmOpCodes.LSUB:
140:                    return new Lsub();
141:
142:                case JvmOpCodes.LXOR:
143:                    return new Lxor();
144:
145:                default:
146:                    throw new IllegalArgumentException(
147:                            "Input argument opcodetype did not match any valid jvminstruction values");
148:
149:                }
150:            }
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.