soot.shimple.internal
Class SPatchingChain

java.lang.Object
  extended byjava.util.AbstractCollection
      extended bysoot.PatchingChain
          extended bysoot.shimple.internal.SPatchingChain
All Implemented Interfaces:
Chain, Collection, Serializable

public class SPatchingChain
extends PatchingChain

Internal Shimple extension of PatchingChain.

Author:
Navindra Umanee
See Also:
PatchingChain, Serialized Form

Nested Class Summary
protected  class SPatchingChain.SPatchingIterator
           
 
Nested classes inherited from class soot.PatchingChain
PatchingChain.PatchingIterator
 
Field Summary
protected  Map boxToNeedsPatching
          Flag that indicates whether control flow falls through from the box to the Phi node.
protected  Map boxToPhiNode
          Map from UnitBox to the Phi node owning it.
 
Fields inherited from class soot.PatchingChain
innerChain
 
Constructor Summary
SPatchingChain(Body aBody, Chain aChain)
           
 
Method Summary
 boolean add(Object o)
          Adds the given object to this Chain.
 void addFirst(Object u)
          Adds the given object at the beginning of the Chain.
 void addLast(Object u)
          Adds the given object at the end of the Chain.
protected  void computeNeedsPatching()
          NOTE: This will *miss* all the Phi nodes outside a chain.
protected  SUnitBox getSBox(Object box)
           
 void insertAfter(List toInsert, Object point)
          Inserts toInsert in the Chain after point.
 void insertAfter(Object toInsert, Object point)
          Inserts toInsert in the Chain after point.
 void insertBefore(List toInsert, Object point)
          Inserts toInsert in the Chain before point.
 void insertBefore(Object toInsert, Object point)
          Inserts toInsert in the Chain before point.
 Iterator iterator()
          Returns an iterator over this Chain.
 Iterator iterator(Object u)
          Returns an iterator over this Chain, starting at the given object.
 Iterator iterator(Object head, Object tail)
          Returns an iterator over this Chain, starting at head and reaching tail (inclusive).
protected  void processPhiNode(Object o)
           
 boolean remove(Object obj)
          Removes the given object from this Chain.
protected  void reprocessPhiNodes()
           
 void swapWith(Object out, Object in)
          Replaces out in the Chain by in.
 
Methods inherited from class soot.PatchingChain
contains, follows, getFirst, getLast, getNonPatchingChain, getPredOf, getSuccOf, insertAfter, insertBefore, removeFirst, removeLast, size, snapshotIterator
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray
 

Field Detail

boxToPhiNode

protected Map boxToPhiNode
Map from UnitBox to the Phi node owning it.


boxToNeedsPatching

protected Map boxToNeedsPatching
Flag that indicates whether control flow falls through from the box to the Phi node. null indicates we probably need a call to computeInternal().

Constructor Detail

SPatchingChain

public SPatchingChain(Body aBody,
                      Chain aChain)
Method Detail

add

public boolean add(Object o)
Description copied from class: PatchingChain
Adds the given object to this Chain.

Specified by:
add in interface Collection
Overrides:
add in class PatchingChain

swapWith

public void swapWith(Object out,
                     Object in)
Description copied from class: PatchingChain
Replaces out in the Chain by in.

Specified by:
swapWith in interface Chain
Overrides:
swapWith in class PatchingChain

insertAfter

public void insertAfter(Object toInsert,
                        Object point)
Description copied from class: PatchingChain
Inserts toInsert in the Chain after point.

Specified by:
insertAfter in interface Chain
Overrides:
insertAfter in class PatchingChain

insertAfter

public void insertAfter(List toInsert,
                        Object point)
Description copied from class: PatchingChain
Inserts toInsert in the Chain after point.

Specified by:
insertAfter in interface Chain
Overrides:
insertAfter in class PatchingChain

insertBefore

public void insertBefore(List toInsert,
                         Object point)
Description copied from class: PatchingChain
Inserts toInsert in the Chain before point.

Specified by:
insertBefore in interface Chain
Overrides:
insertBefore in class PatchingChain

insertBefore

public void insertBefore(Object toInsert,
                         Object point)
Description copied from class: PatchingChain
Inserts toInsert in the Chain before point.

Specified by:
insertBefore in interface Chain
Overrides:
insertBefore in class PatchingChain

addFirst

public void addFirst(Object u)
Description copied from class: PatchingChain
Adds the given object at the beginning of the Chain.

Specified by:
addFirst in interface Chain
Overrides:
addFirst in class PatchingChain

addLast

public void addLast(Object u)
Description copied from class: PatchingChain
Adds the given object at the end of the Chain.

Specified by:
addLast in interface Chain
Overrides:
addLast in class PatchingChain

remove

public boolean remove(Object obj)
Description copied from class: PatchingChain
Removes the given object from this Chain.

Specified by:
remove in interface Chain
Overrides:
remove in class PatchingChain

processPhiNode

protected void processPhiNode(Object o)

reprocessPhiNodes

protected void reprocessPhiNodes()

computeNeedsPatching

protected void computeNeedsPatching()
NOTE: This will *miss* all the Phi nodes outside a chain. So make sure you know what you are doing if you remove a Phi node from a chain and don't put it back or call clearUnitBoxes() on it.


getSBox

protected SUnitBox getSBox(Object box)

iterator

public Iterator iterator()
Description copied from class: PatchingChain
Returns an iterator over this Chain.

Specified by:
iterator in interface Chain
Overrides:
iterator in class PatchingChain

iterator

public Iterator iterator(Object u)
Description copied from class: PatchingChain
Returns an iterator over this Chain, starting at the given object.

Specified by:
iterator in interface Chain
Overrides:
iterator in class PatchingChain

iterator

public Iterator iterator(Object head,
                         Object tail)
Description copied from class: PatchingChain
Returns an iterator over this Chain, starting at head and reaching tail (inclusive).

Specified by:
iterator in interface Chain
Overrides:
iterator in class PatchingChain