soot.toolkits.graph
Class LoopNestTree

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.TreeSet<Loop>
              extended by soot.toolkits.graph.LoopNestTree
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Loop>, Collection<Loop>, NavigableSet<Loop>, Set<Loop>, SortedSet<Loop>

public class LoopNestTree
extends TreeSet<Loop>

A loop nesting tree, implemented as a tree-map. Loops are represented by pairs of head-statements and the respective loop. The iterator over this collection returns the loop in such an order that a loop l will always returned before a loop m if l is an inner loop of m.

Author:
Eric Bodden
See Also:
Serialized Form

Constructor Summary
LoopNestTree(Body b)
          Builds a loop nest tree from a method body using LoopFinder.
LoopNestTree(Collection<Loop> loops)
          Builds a loop nest tree from a mapping from loop headers to statements in the loop.
 
Method Summary
 boolean hasNestedLoops()
           
 
Methods inherited from class java.util.TreeSet
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

LoopNestTree

public LoopNestTree(Body b)
Builds a loop nest tree from a method body using LoopFinder.


LoopNestTree

public LoopNestTree(Collection<Loop> loops)
Builds a loop nest tree from a mapping from loop headers to statements in the loop.

Method Detail

hasNestedLoops

public boolean hasNestedLoops()