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


java.lang.Object
   soot.tagkit.AbstractHost
      soot.Body

All known Subclasses:   soot.baf.BafBody,  soot.jimple.StmtBody,  soot.dava.DavaBody,
Body
abstract public class Body extends AbstractHost implements Serializable(Code)
Abstract base class that models the body (code attribute) of a Java method. Classes that implement an Intermediate Representation for a method body should subclass it. In particular the classes GrimpBody, JimpleBody and BafBody all extend this class. This class provides methods that are common to any IR, such as methods to get the body's units (statements), traps, and locals.
See Also:   soot.grimp.GrimpBody
See Also:   soot.jimple.JimpleBody
See Also:   soot.baf.BafBody


Field Summary
protected  Chain<Local>localChain
     The chain of locals for this Body.
protected transient  SootMethodmethod
     The method associated with this Body.
protected  Chain<Trap>trapChain
     The chain of traps for this Body.
protected  PatchingChain<Unit>unitChain
     The chain of units for this Body.

Constructor Summary
protected  Body(SootMethod m)
     Creates a Body associated to the given method.
protected  Body()
     Creates an extremely empty Body.

Method Summary
public  voidcheckInit()
    
abstract public  Objectclone()
     Creates a deep copy of this Body.
public  List<UnitBox>getAllUnitBoxes()
     Returns the result of iterating through all Units in this body and querying them for their UnitBoxes.
public  List<ValueBox>getDefBoxes()
     Returns the result of iterating through all Units in this body and querying them for ValueBoxes defined.
public  intgetLocalCount()
     Returns the number of locals declared in this body.
public  Chain<Local>getLocals()
     Returns a backed chain of the locals declared in this Body.
public  SootMethodgetMethod()
     Returns the method associated with this Body.
public  LocalgetParameterLocal(int i)
     Return LHS of the first identity stmt assigning from \@parameter i.
public  LocalgetThisLocal()
     Return LHS of the first identity stmt assigning from \@this.
public  Chain<Trap>getTraps()
     Returns a backed view of the traps found in this Body.
public  List<UnitBox>getUnitBoxes(boolean branchTarget)
     If branchTarget is true, returns the result of iterating through all branching Units in this body and querying them for their UnitBoxes.
public  PatchingChain<Unit>getUnits()
     Returns the Chain of Units that make up this body.
public  List<ValueBox>getUseAndDefBoxes()
     Returns a list of boxes corresponding to Values either used or defined in any unit of this Body.
public  List<ValueBox>getUseBoxes()
     Returns the result of iterating through all Units in this body and querying them for ValueBoxes used.
public  Map<Object, Object>importBodyContentsFrom(Body b)
     Copies the contents of the given Body into this one.
public  voidsetMethod(SootMethod method)
     Sets the method associated with this Body.
public  StringtoString()
    
public  voidvalidate()
     Verifies a few sanity conditions on the contents on this body.
public  voidvalidateLocals()
     Verifies that each Local of getUseAndDefBoxes() is in this body's locals Chain.
public  voidvalidateTraps()
     Verifies that the begin, end and handler units of each trap are in this body.
public  voidvalidateUnitBoxes()
     Verifies that the UnitBoxes of this Body all point to a Unit contained within this body.
public  voidvalidateUses()
     Verifies that each use in this Body has a def.
public  voidvalidateValueBoxes()
     Verifies that a ValueBox is not used in more than one place.

Field Detail
localChain
protected Chain<Local> localChain(Code)
The chain of locals for this Body.



method
protected transient SootMethod method(Code)
The method associated with this Body.



trapChain
protected Chain<Trap> trapChain(Code)
The chain of traps for this Body.



unitChain
protected PatchingChain<Unit> unitChain(Code)
The chain of units for this Body.




Constructor Detail
Body
protected Body(SootMethod m)(Code)
Creates a Body associated to the given method. Used by subclasses during initialization. Creation of a Body is triggered by e.g. Jimple.v().newBody(options).



Body
protected Body()(Code)
Creates an extremely empty Body. The Body is not associated to any method.




Method Detail
checkInit
public void checkInit()(Code)



clone
abstract public Object clone()(Code)
Creates a deep copy of this Body.



getAllUnitBoxes
public List<UnitBox> getAllUnitBoxes()(Code)
Returns the result of iterating through all Units in this body and querying them for their UnitBoxes. All UnitBoxes thus found are returned. Branching Units and statements which use PhiExpr will have UnitBoxes; a UnitBox contains a Unit that is either a target of a branch or is being used as a pointer to the end of a CFG block.

This method is typically used for pointer patching, eg when the unit chain is cloned. A list of all the UnitBoxes held by this body's units.
See Also:   UnitBox
See Also:   Body.getUnitBoxes(boolean)
See Also:   Unit.getUnitBoxes
See Also:   soot.shimple.PhiExpr.getUnitBoxes




getDefBoxes
public List<ValueBox> getDefBoxes()(Code)
Returns the result of iterating through all Units in this body and querying them for ValueBoxes defined. All of the ValueBoxes found are then returned as a List. a list of all the ValueBoxes for Values defined by this body's units.
See Also:   Value
See Also:   Unit.getDefBoxes
See Also:   ValueBox
See Also:   Value



getLocalCount
public int getLocalCount()(Code)
Returns the number of locals declared in this body.



getLocals
public Chain<Local> getLocals()(Code)
Returns a backed chain of the locals declared in this Body.



getMethod
public SootMethod getMethod()(Code)
Returns the method associated with this Body. the method that owns this body.



getParameterLocal
public Local getParameterLocal(int i)(Code)
Return LHS of the first identity stmt assigning from \@parameter i. *



getThisLocal
public Local getThisLocal()(Code)
Return LHS of the first identity stmt assigning from \@this. *



getTraps
public Chain<Trap> getTraps()(Code)
Returns a backed view of the traps found in this Body.



getUnitBoxes
public List<UnitBox> getUnitBoxes(boolean branchTarget)(Code)
If branchTarget is true, returns the result of iterating through all branching Units in this body and querying them for their UnitBoxes. These UnitBoxes contain Units that are the target of a branch. This is useful for, say, labeling blocks or updating the targets of branching statements.

If branchTarget is false, returns the result of iterating through the non-branching Units in this body and querying them for their UnitBoxes. Any such UnitBoxes (typically from PhiExpr) contain a Unit that indicates the end of a CFG block. a list of all the UnitBoxes held by this body'sbranching units.
See Also:   UnitBox
See Also:   Body.getAllUnitBoxes()
See Also:   Unit.getUnitBoxes
See Also:   soot.shimple.PhiExpr.getUnitBoxes




getUnits
public PatchingChain<Unit> getUnits()(Code)
Returns the Chain of Units that make up this body. The units are returned as a PatchingChain. The client can then manipulate the chain, adding and removing units, and the changes will be reflected in the body. Since a PatchingChain is returned the client need not worry about removing exception boundary units or otherwise corrupting the chain. the units in this Body
See Also:   PatchingChain
See Also:   Unit



getUseAndDefBoxes
public List<ValueBox> getUseAndDefBoxes()(Code)
Returns a list of boxes corresponding to Values either used or defined in any unit of this Body. a list of ValueBoxes for held by the body's Units.
See Also:   Value
See Also:   Unit.getUseAndDefBoxes
See Also:   ValueBox
See Also:   Value



getUseBoxes
public List<ValueBox> getUseBoxes()(Code)
Returns the result of iterating through all Units in this body and querying them for ValueBoxes used. All of the ValueBoxes found are then returned as a List. a list of all the ValueBoxes for the Values used this body's units.
See Also:   Value
See Also:   Unit.getUseBoxes
See Also:   ValueBox
See Also:   Value



importBodyContentsFrom
public Map<Object, Object> importBodyContentsFrom(Body b)(Code)
Copies the contents of the given Body into this one.



setMethod
public void setMethod(SootMethod method)(Code)
Sets the method associated with this Body.
Parameters:
  method - the method that owns this body.



toString
public String toString()(Code)



validate
public void validate()(Code)
Verifies a few sanity conditions on the contents on this body.



validateLocals
public void validateLocals()(Code)
Verifies that each Local of getUseAndDefBoxes() is in this body's locals Chain.



validateTraps
public void validateTraps()(Code)
Verifies that the begin, end and handler units of each trap are in this body.



validateUnitBoxes
public void validateUnitBoxes()(Code)
Verifies that the UnitBoxes of this Body all point to a Unit contained within this body.



validateUses
public void validateUses()(Code)
Verifies that each use in this Body has a def.



validateValueBoxes
public void validateValueBoxes()(Code)
Verifies that a ValueBox is not used in more than one place.



Methods inherited from soot.tagkit.AbstractHost
public void addAllTagsOf(Host h)(Code)(Java Doc)
public void addTag(Tag t)(Code)(Java Doc)
public Tag getTag(String aName)(Code)(Java Doc)
public List<Tag> getTags()(Code)(Java Doc)
public boolean hasTag(String aName)(Code)(Java Doc)
public void removeAllTags()(Code)(Java Doc)
public void removeTag(String aName)(Code)(Java Doc)

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.