if (_elements == null) {
_elements = right._elements;
}
else {
final Vector temp = right._elements;
if (temp != null) {
final int n = temp.size();
for (int i = 0; i < n; i++) {
_elements.addElement(temp.elementAt(i));
}
}
}
return this;
Back patch a flow list. All instruction handles must be branch handles.
if (_elements != null) {
final int n = _elements.size();
for (int i = 0; i < n; i++) {
BranchHandle bh = (BranchHandle)_elements.elementAt(i);
bh.setTarget(target);
}
_elements.clear(); // avoid backpatching more than once
}
Redirect the handles from oldList to newList. "This" flow list
is assumed to be relative to oldList.
final FlowList result = new FlowList();
if (_elements == null) {
return result;
}
final int n = _elements.size();
final Iterator oldIter = oldList.iterator();
final Iterator newIter = newList.iterator();
while (oldIter.hasNext()) {
final InstructionHandle oldIh = (InstructionHandle) oldIter.next();
final InstructionHandle newIh = (InstructionHandle) newIter.next();
for (int i = 0; i < n; i++) {
if (_elements.elementAt(i) == oldIh) {
result.add(newIh);
}
}
}
return result;