Source Code Cross Referenced for StatementProcessor.java in  » Code-Analyzer » soot » dk » brics » soot » intermediate » representation » 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 » Code Analyzer » soot » dk.brics.soot.intermediate.representation 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package dk.brics.soot.intermediate.representation;
002:
003:        public class StatementProcessor<T> {
004:
005:            /**
006:             * Constructs a new Statement processor.
007:             */
008:            public StatementProcessor() {
009:            }
010:
011:            /**
012:             * Processes an {@link FooMethodCall}.
013:             * This invokes {@link #pre(Statment)}, 
014:             * if that returns null then {@link #process(FooMethodCall)} is invoked, 
015:             * Finally, {@link #post(Statement, Object)} is invoked.
016:             * @param s Statement
017:             * @return result
018:             */
019:            public T dispatch(FooMethodCall s) {
020:                T t = pre(s);
021:                if (t == null)
022:                    t = process(s);
023:                post(s, t);
024:                return t;
025:            }
026:
027:            /**
028:             * Processes an {@link SomeMethodCall}.
029:             * This invokes {@link #pre(Statment)}, 
030:             * if that returns null then {@link #process(SomeMethodCall)} is invoked, 
031:             * Finally, {@link #post(Statement, Object)} is invoked.
032:             * @param s Statement
033:             * @return result
034:             */
035:            public T dispatch(SomeMethodCall s) {
036:                T t = pre(s);
037:                if (t == null)
038:                    t = process(s);
039:                post(s, t);
040:                return t;
041:            }
042:
043:            /**
044:             * Processes an {@link FooInit}.
045:             * This invokes {@link #pre(Statment)}, 
046:             * if that returns null then {@link #process(FooInit)} is invoked, 
047:             * Finally, {@link #post(Statement, Object)} is invoked.
048:             * @param s Statement
049:             * @return result
050:             */
051:            public T dispatch(FooInit s) {
052:                T t = pre(s);
053:                if (t == null)
054:                    t = process(s);
055:                post(s, t);
056:                return t;
057:            }
058:
059:            /**
060:             * Processes an {@link FooAssignment}.
061:             * This invokes {@link #pre(Statment)}, 
062:             * if that returns null then {@link #process(FooAssignment)} is invoked, 
063:             * Finally, {@link #post(Statement, Object)} is invoked.
064:             * @param s Statement
065:             * @return result
066:             */
067:            public T dispatch(FooAssignment s) {
068:                T t = pre(s);
069:                if (t == null)
070:                    t = process(s);
071:                post(s, t);
072:                return t;
073:            }
074:
075:            /**
076:             * Processes an {@link Return}.
077:             * This invokes {@link #pre(Statment)}, 
078:             * if that returns null then {@link #process(Return)} is invoked, 
079:             * Finally, {@link #post(Statement, Object)} is invoked.
080:             * @param s Statement
081:             * @return result
082:             */
083:            public T dispatch(Return s) {
084:                T t = pre(s);
085:                if (t == null)
086:                    t = process(s);
087:                post(s, t);
088:                return t;
089:            }
090:
091:            /**
092:             * Processes an {@link Nop}.
093:             * This invokes {@link #pre(Statment)}, 
094:             * if that returns null then {@link #process(Nop)} is invoked, 
095:             * Finally, {@link #post(Statement, Object)} is invoked.
096:             * @param s Statement
097:             * @return result
098:             */
099:            public T dispatch(Nop s) {
100:                T t = pre(s);
101:                if (t == null)
102:                    t = process(s);
103:                post(s, t);
104:                return t;
105:            }
106:
107:            /**
108:             * Processes an {@link MethodHead}.
109:             * This invokes {@link #pre(Statment)}, 
110:             * if that returns null then {@link #process(MethodHead)} is invoked, 
111:             * Finally, {@link #post(Statement, Object)} is invoked.
112:             * @param s Statement
113:             * @return result
114:             */
115:            public T dispatch(MethodHead s) {
116:                T t = pre(s);
117:                if (t == null)
118:                    t = process(s);
119:                post(s, t);
120:                return t;
121:            }
122:
123:            /**
124:             * Method to be invoked for processing an {@link FooMethodCall}.
125:             * By default, nothing happens and null is returned.
126:             * @param s current Statement
127:             * @return result
128:             */
129:            public T process(FooMethodCall s) {
130:                return null;
131:            }
132:
133:            /**
134:             * Method to be invoked for processing an {@link SomeMethodCall}.
135:             * By default, nothing happens and null is returned.
136:             * @param s current Statement
137:             * @return result
138:             */
139:            public T process(SomeMethodCall s) {
140:                return null;
141:            }
142:
143:            /**
144:             * Method to be invoked for processing an {@link FooInit}.
145:             * By default, nothing happens and null is returned.
146:             * @param s current Statement
147:             * @return result
148:             */
149:            public T process(FooInit s) {
150:                return null;
151:            }
152:
153:            /**
154:             * Method to be invoked for processing an {@link FooAssignment}.
155:             * By default, nothing happens and null is returned.
156:             * @param s current Statement
157:             * @return result
158:             */
159:            public T process(FooAssignment s) {
160:                return null;
161:            }
162:
163:            /**
164:             * Method to be invoked for processing an {@link Return}.
165:             * By default, nothing happens and null is returned.
166:             * @param s current Statement
167:             * @return result
168:             */
169:            public T process(Return s) {
170:                return null;
171:            }
172:
173:            /**
174:             * Method to be invoked for processing an {@link Nop}.
175:             * By default, nothing happens and null is returned.
176:             * @param s current Statement
177:             * @return result
178:             */
179:            public T process(Nop s) {
180:                return null;
181:            }
182:
183:            /**
184:             * Method to be invoked for processing an {@link MethodHead}.
185:             * By default, nothing happens and null is returned.
186:             * @param s current Statement
187:             * @return result
188:             */
189:            public T process(MethodHead s) {
190:                return null;
191:            }
192:
193:            /**
194:             * Method to be invoked for preprocessing a {@link Statement}.
195:             * By default, nothing happens and null is returned.
196:             * @param s current Statement
197:             * @return result
198:             */
199:            public T pre(Statement s) {
200:                return null;
201:            }
202:
203:            /**
204:             * Method to be invoked for postprocessing a {@link Statement}.
205:             * By default, nothing happens.
206:             * @param s current Statment
207:             * @param t result from <code>process</code>
208:             */
209:            public void post(Statement s, T t) {
210:            }
211:
212:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.