Source Code Cross Referenced for ExceptionalGraph.java in  » Code-Analyzer » soot » soot » toolkits » graph » 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 » soot.toolkits.graph 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Soot - a J*va Optimization Framework
002:         * Copyright (C) 2004 John Jorgensen
003:         *
004:         * This library is free software; you can redistribute it and/or
005:         * modify it under the terms of the GNU Lesser General Public
006:         * License as published by the Free Software Foundation; either
007:         * version 2.1 of the License, or (at your option) any later version.
008:         *
009:         * This library is distributed in the hope that it will be useful,
010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:         * Lesser General Public License for more details.
013:         *
014:         * You should have received a copy of the GNU Lesser General Public
015:         * License along with this library; if not, write to the
016:         * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
017:         * Boston, MA 02111-1307, USA.
018:         */
019:
020:        /*
021:         * Modified by the Sable Research Group and others 1997-2004.  
022:         * See the 'credits' file distributed with Soot for the complete list of
023:         * contributors.  (Soot is distributed at http://www.sable.mcgill.ca/soot)
024:         */
025:
026:        package soot.toolkits.graph;
027:
028:        import soot.toolkits.graph.DirectedGraph;
029:        import soot.Body;
030:        import soot.Trap;
031:        import soot.Unit;
032:
033:        import java.util.List;
034:        import java.util.Collection;
035:        import soot.toolkits.exceptions.ThrowableSet;
036:
037:        /**
038:         *  <p>Defines the interface for navigating a control flow graph which
039:         *  distinguishes exceptional control flow.</p>
040:         *  @param N node type
041:         */
042:        public interface ExceptionalGraph<N extends Unit> extends
043:                DirectedGraph<N> {
044:            /**
045:             * <p>Data structure to represent the fact that
046:             * a given {@link Trap} will catch some subset of the exceptions
047:             * which may be thrown by a given graph node.</p>
048:             *
049:             * <p>Note that these ``destinations'' are different from the
050:             * edges in the CFG proper which are returned by
051:             * <code>getSuccsOf()</code> and <code>getPredsOf()</code>. An
052:             * edge from <code>a</code> to <code>b</code> in the CFG
053:             * represents the fact that after node <code>a</code> executes
054:             * (perhaps only partially, if it throws an exception after
055:             * producing a side effect), execution may proceed to
056:             * node <code>b</code>.  An ExceptionDest from <code>a</code> to
057:             * <code>b</code>, on the other hand, says that when
058:             * <code>a</code> fails to execute, execution may proceed
059:             * to <code>b</code> instead.</p>
060:             */
061:            public interface ExceptionDest<N> {
062:
063:                /**
064:                 * Returns the trap corresponding to this destination.
065:                 *
066:                 * @return either a {@link Trap} representing the handler that
067:                 * catches the exceptions, if there is such a handler within
068:                 * the method, or <code>null</code> if there is no such
069:                 * handler and the exceptions cause the method to terminate
070:                 * abruptly.
071:                 */
072:                public Trap getTrap();
073:
074:                /**
075:                 * Returns the exceptions thrown to this destination.
076:                 *
077:                 * @return a {@link ThrowableSet} representing
078:                 * the exceptions which may be caught by this 
079:                 * <code>ExceptionDest</code>'s trap.
080:                 */
081:                public ThrowableSet getThrowables();
082:
083:                /**
084:                 * Returns the CFG node corresponding to the beginning of
085:                 * the exception handler that catches the exceptions (that is,
086:                 * the node that includes {@link trap().getBeginUnit()}).
087:                 *
088:                 * @return the node in this graph which represents the
089:                 * beginning of the handler which catches these exceptions, or
090:                 * <code>null</code> if there is no such handler and the
091:                 * exceptions cause the method to terminate abruptly.
092:                 */
093:                // Maybe we should define an interface for Unit and Block to
094:                // implement, and return an instance of that, rather than
095:                // an Object.  We chose Object because that's what DirectedGraph
096:                // deals in.
097:                public N getHandlerNode();
098:            }
099:
100:            /**
101:             * Returns the {@link Body} from which this graph was built.
102:             *
103:             * @return the <code>Body</code> from which this graph was built.
104:             */
105:            public Body getBody();
106:
107:            /**
108:             * Returns a list of nodes which are predecessors of a given
109:             * node when only unexceptional control flow is considered.
110:             *
111:             * @param n The node whose predecessors are to be returned.
112:             *
113:             * @return a {@link List} of the nodes in this graph from which
114:             *         there is an unexceptional edge to <code>n</code>.
115:             */
116:            public List<N> getUnexceptionalPredsOf(N n);
117:
118:            /**
119:             * Returns a list of nodes which are successors of a given
120:             * node when only unexceptional control flow is considered.
121:             *
122:             * @param n The node whose successors are to be returned.
123:             *
124:             * @return a {@link List} of nodes in this graph to which 
125:             *         there is an unexceptional edge from <code>n</code>.
126:             */
127:            public List<N> getUnexceptionalSuccsOf(N n);
128:
129:            /**
130:             * Returns a list of nodes which are predecessors of a given
131:             * node when only exceptional control flow is considered.
132:             *
133:             * @param n The node whose predecessors are to be returned.
134:             *
135:             * @return a {@link List} of nodes in this graph from which 
136:             *         there is an exceptional edge to <code>n</code>.
137:             */
138:            public List<N> getExceptionalPredsOf(N n);
139:
140:            /**
141:             * Returns a list of nodes which are successors of a given
142:             * node when only exceptional control flow is considered.
143:             *
144:             * @param n The node whose successors are to be returned.
145:             *
146:             * @return a {@link List} of nodes in this graph to which 
147:             *         there is an exceptional edge from <code>n</code>.
148:             */
149:            public List<N> getExceptionalSuccsOf(N n);
150:
151:            /**
152:             * Returns a collection of 
153:             * {@link ExceptionalGraph.ExceptionDest ExceptionDest}
154:             * objects which represent how exceptions thrown by a specified
155:             * node will be handled.
156:             *
157:             * @param n The node for which to provide exception information.
158:             *
159:             * @return a collection of <code>ExceptionDest</code> objects describing
160:             *	       the traps and handlers, if any, which catch the exceptions
161:             *	       which may be thrown by <code>n</code>.
162:             */
163:            public Collection<N> getExceptionDests(N n);
164:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.