Class FanOut

java.lang.Object
org.jboss.byteman.agent.adapter.cfg.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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.objectweb.asm.Label
    the 1 in the 1:m
    private List<org.objectweb.asm.Label>
    the m in the 1:m
  • 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
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(org.objectweb.asm.Label to)
    add a new link to the target set
    org.objectweb.asm.Label
     
    org.objectweb.asm.Label
    getTo(int i)
    retrieve a link from the target set by index
    int
    retrieve the size of the target set
    Iterator<org.objectweb.asm.Label>
    obtain an iterator over the target set

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • from

      private org.objectweb.asm.Label from
      the 1 in the 1:m
    • to

      private List<org.objectweb.asm.Label> to
      the m in the 1:m
  • Constructor Details

    • 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 Details

    • 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