Class FanOut


  • public class FanOut
    extends Object
    A representation of a 1:M relation between labels/code locations. This is used to represent branchouts in a CFG where the 1 is the label of the BBlock and the M lists outgoing normal (non-exception) control flow. It is also used to represent the relationship between basic blocks (identified by their primary label) and labels identifying instructions contained in the block. Note that in the former case the use of labels allows control flow linkes to basic blocks which have not yet been generated to be recorded.
    • Constructor Summary

      Constructors 
      Constructor Description
      FanOut​(org.objectweb.asm.Label from)
      construct a new empty link
      FanOut​(org.objectweb.asm.Label from, org.objectweb.asm.Label to)
      construct a new link with one element in the target set
      FanOut​(org.objectweb.asm.Label from, org.objectweb.asm.Label to1, org.objectweb.asm.Label to2)
      construct a new link with two elements in the target set
    • Constructor Detail

      • FanOut

        public FanOut​(org.objectweb.asm.Label from)
        construct a new empty link
        Parameters:
        from - the start point for all links in the set
      • FanOut

        public FanOut​(org.objectweb.asm.Label from,
                      org.objectweb.asm.Label to)
        construct a new link with one element in the target set
        Parameters:
        from - the start point for all links in the set
        to - the first link target
      • FanOut

        public FanOut​(org.objectweb.asm.Label from,
                      org.objectweb.asm.Label to1,
                      org.objectweb.asm.Label to2)
        construct a new link with two elements in the target set
        Parameters:
        from - the start point for all links in the set
        to1 - the first link target
        to2 - the second link target
    • Method Detail

      • getFrom

        public org.objectweb.asm.Label getFrom()
      • append

        public void append​(org.objectweb.asm.Label to)
        add a new link to the target set
        Parameters:
        to - the target of the link
      • getTo

        public org.objectweb.asm.Label getTo​(int i)
        retrieve a link from the target set by index
        Parameters:
        i - the target link index
        Returns:
        a label for the target
      • getToCount

        public int getToCount()
        retrieve the size of the target set
        Returns:
        the size
      • iterator

        public Iterator<org.objectweb.asm.Label> iterator()
        obtain an iterator over the target set
        Returns:
        an iterator