org.jboss.byteman.agent.adapter.cfg
Class FanOut

java.lang.Object
  extended by org.jboss.byteman.agent.adapter.cfg.FanOut

public class FanOut
extends java.lang.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
private  Label from
          the 1 in the 1:m
private  java.util.List<Label> to
          the m in the 1:m
 
Constructor Summary
FanOut(Label from)
          construct a new empty link
FanOut(Label from, Label to)
          construct a new link with one element in the target set
FanOut(Label from, Label to1, Label to2)
          construct a new link with two elements in the target set
 
Method Summary
 void append(Label to)
          add a new link to the target set
 Label getFrom()
           
 Label getTo(int i)
          retrieve alink from the target set by index
 int getToCount()
          retrieve the size of the target set
 java.util.Iterator<Label> iterator()
          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 Detail

from

private Label from
the 1 in the 1:m


to

private java.util.List<Label> to
the m in the 1:m

Constructor Detail

FanOut

public FanOut(Label from)
construct a new empty link

Parameters:
from -

FanOut

public FanOut(Label from,
              Label to)
construct a new link with one element in the target set

Parameters:
from -
to -

FanOut

public FanOut(Label from,
              Label to1,
              Label to2)
construct a new link with two elements in the target set

Parameters:
from -
to1 -
to2 -
Method Detail

getFrom

public Label getFrom()

append

public void append(Label to)
add a new link to the target set

Parameters:
to -

getTo

public Label getTo(int i)
retrieve alink from the target set by index

Parameters:
i -
Returns:

getToCount

public int getToCount()
retrieve the size of the target set

Returns:

iterator

public java.util.Iterator<Label> iterator()
obtain an iterator over the target set

Returns: