Java Doc for CallGraph.java in  » Database-DBMS » db4o-6.4 » EDU » purdue » cs » bloat » inline » 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 » Database DBMS » db4o 6.4 » EDU.purdue.cs.bloat.inline 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   EDU.purdue.cs.bloat.inline.CallGraph

CallGraph
public class CallGraph (Code)
Grants access to certain information about a Java program. At least one root method must be specified. From these root methods, the call graph and information such as the classes that are instantiated during the Java program is computed.

The construction of the call graph is in the spirit of the "Program Virtual-call Graph" presented in [Bacon97]. However, certain changes have been made to tailor it to BLOAT and Java and to make the overall representation smaller.

Rapid type analysis is integrated into the construction of the call graph. A virtual method is not examined until we know that its declaring class has been instantiated.

Some classes are created internally by the VM and are missed by our analysis. So, we maintain a set of "pre-live" classes. We consider all of their constructors to be live.



Field Summary
public static  booleanDEBUG
    
public static  booleanUSE1_2
    
public static  booleanUSEPRELIVE
    
 InlineContextcontext
    
 SetliveMethods
    
 Listworklist
    

Constructor Summary
public  CallGraph(InlineContext context, Set roots)
     Constructor.

Method Summary
 voidaddCall(MethodEditor callerMethod, MemberRef callee)
     Makes note of one method calling another.
 voidaddClinit(Type type)
     Adds the static initializer for a given Type to the worklist.
public static  voidaddPreLive(String name)
    
static  voiddb(String s)
    
 voiddoVirtual(MethodEditor caller, MemberRef callee)
     Handles a virtual call.
public  SetliveClasses()
     Returns the set of classes (Types) that are instantiated in the program.
public  SetliveMethods()
     Returns the set of methods (MemberRefs) that the construction algorithm has deemed to be live.
 voidmakeLive(Type type)
     Marks a Type as being lives.
public  voidprint(PrintWriter out, boolean printLeaves)
     Prints a textual prepresentation of the CallGraph to a PrintWriter.
public  voidprintSummary(PrintWriter out)
     Prints a summary of the call graph.
public static  booleanremovePreLive(String name)
    
public  SetresolvesTo(MemberRef method)
     Returns the methods (MemberRefs) to which a given method could resolve.
public  SetresolvesTo(MemberRef method, Set rTypes)
     Returns the methods (MemberRefs) to which a given method could resolve given that the receiver is in a certain set of types.
public  Setroots()
     Returns the root methods (MemberRefs) of the call graph.

Field Detail
DEBUG
public static boolean DEBUG(Code)



USE1_2
public static boolean USE1_2(Code)



USEPRELIVE
public static boolean USEPRELIVE(Code)



context
InlineContext context(Code)



liveMethods
Set liveMethods(Code)



worklist
List worklist(Code)




Constructor Detail
CallGraph
public CallGraph(InlineContext context, Set roots)(Code)
Constructor.
Parameters:
  context - InlineContext used to examine classes and methods.
Parameters:
  roots - The methods (represented as MemberRefs) consideredto the roots (that is, the "main" methods) of the call graph.Presumably, only static methods or constructors can be rootmethods.




Method Detail
addCall
void addCall(MethodEditor callerMethod, MemberRef callee)(Code)
Makes note of one method calling another. This does not make the method live.



addClinit
void addClinit(Type type)(Code)
Adds the static initializer for a given Type to the worklist.



addPreLive
public static void addPreLive(String name)(Code)
Adds (the name of) a class to the set of classes that are considered to be "pre-live"



db
static void db(String s)(Code)



doVirtual
void doVirtual(MethodEditor caller, MemberRef callee)(Code)
Handles a virtual call. Determines all possible methods the call could resolve to. Adds the method whose declaring classes are live to the worklist. Blocks the rest on their declaring types.



liveClasses
public Set liveClasses()(Code)
Returns the set of classes (Types) that are instantiated in the program.



liveMethods
public Set liveMethods()(Code)
Returns the set of methods (MemberRefs) that the construction algorithm has deemed to be live.



makeLive
void makeLive(Type type)(Code)
Marks a Type as being lives. It also unblocks any methods that were blocked on the type.



print
public void print(PrintWriter out, boolean printLeaves)(Code)
Prints a textual prepresentation of the CallGraph to a PrintWriter.
Parameters:
  out - To where we print
Parameters:
  printLeaves - If true, leaf methods (methods that do not callany other methods) are printed



printSummary
public void printSummary(PrintWriter out)(Code)
Prints a summary of the call graph. Including the classes that are live and which methods are blocked.



removePreLive
public static boolean removePreLive(String name)(Code)
Removes a class from the set of "pre-live" classes true if the class was "pre-live"



resolvesTo
public Set resolvesTo(MemberRef method)(Code)
Returns the methods (MemberRefs) to which a given method could resolve. Only live methods are taken into account. The methods are sorted such that overriding methods appear before overriden methods.



resolvesTo
public Set resolvesTo(MemberRef method, Set rTypes)(Code)
Returns the methods (MemberRefs) to which a given method could resolve given that the receiver is in a certain set of types. Only live methods are taken into account. The methods are sorted such that overriding methods appear before overriden methods.



roots
public Set roots()(Code)
Returns the root methods (MemberRefs) of the call graph.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.