Source Code Cross Referenced for Statement.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:        import java.util.*;
004:
005:        import dk.brics.soot.intermediate.representation.Variable.Type;
006:
007:        /** Superclass of all statements.
008:         *  <p>
009:         *  A statements belongs to the body of some method.
010:         *  It has control flow edges to and from other statements. 
011:         */
012:        public abstract class Statement {
013:            private Collection<Statement> succs;
014:            private Collection<Statement> preds;
015:            /* The method whose body contains this statement. */
016:            protected Method method;
017:            protected int index;
018:
019:            /*
020:             * The target variable for assignment statements 
021:             */
022:            protected Variable assignmentTarget;
023:
024:            public Statement() {
025:                succs = new LinkedList<Statement>();
026:                preds = new LinkedList<Statement>();
027:                this .assignmentTarget = new Variable(Type.OTHER);
028:            }
029:
030:            /** Adds a control flow edge from this statement to the given.
031:             *  @param s the target statement of the edge.
032:             */
033:            public void addSucc(Statement s) {
034:                succs.add(s);
035:                s.addPred(this );
036:            }
037:
038:            void addPred(Statement s) {
039:                preds.add(s);
040:            }
041:
042:            /** Returns all targets of control flow edges
043:             *  originating from this node.
044:             *  @return a collection of {@link dk.brics.soot.intermediate.Statement} objects.
045:             */
046:            public Collection<Statement> getSuccs() {
047:                return succs;
048:            }
049:
050:            /** Returns all origins of control flow edges
051:             *  going to this node.
052:             *  @return a collection of {@link dk.brics.soot.intermediate.Statement} objects.
053:             */
054:            public Collection<Statement> getPreds() {
055:                return preds;
056:            }
057:
058:            /**
059:             *  Set the method whose body contains this statement.
060:             */
061:            void setMethod(Method m) {
062:                method = m;
063:            }
064:
065:            /**
066:             *  Returns the method whose body contains this statement.
067:             *  @return the method.
068:             */
069:            public Method getMethod() {
070:                return method;
071:            }
072:
073:            void setIndex(int index) {
074:                this .index = index;
075:            }
076:
077:            /** Returns the index of this statement, indicating the sequence
078:             *  number in which the statement was added to its method.
079:             *  @return the index.
080:             */
081:            public int getIndex() {
082:                return index;
083:            }
084:
085:            /** Returns a string representation of this statement.
086:             *  This is handled by a {@link dk.brics.soot.intermediate.ToStringVisitor}.
087:             *  @return the statement as a string.
088:             */
089:            public String toString() {
090:                ToStringVisitor tsv = new ToStringVisitor();
091:                return process(tsv);
092:            }
093:
094:            /**
095:             * Visit this statement by the given statement visitor.
096:             * This will invoke the corresponding method in the visitor.
097:             * @param <T> return type
098:             * @param v Entry processor
099:             * @return result from processor
100:             */
101:            abstract public <T> T process(StatementProcessor<T> v);
102:
103:            public Variable getAssignmentTarget() {
104:                return assignmentTarget;
105:            }
106:
107:            public void setAssignmentTarget(Variable assignmentTarget) {
108:                this.assignmentTarget = assignmentTarget;
109:            }
110:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.