public class DavaFlowSet<T> extends AbstractFlowSet<T>
Constructor and Description |
---|
DavaFlowSet() |
DavaFlowSet(DavaFlowSet<T> other) |
Modifier and Type | Method and Description |
---|---|
void |
add(T e)
Adds
obj to this . |
void |
addToBreakList(java.lang.String labelBroken,
DavaFlowSet<T> set)
When an explicit break statement is encountered this method should be
called to store the current davaflowset
|
void |
addToContinueList(java.lang.String labelContinued,
DavaFlowSet<T> set)
When an explicit continue statement is encountered this method should be
called to store the current davaflowset
|
void |
addToImplicitBreaks(DAbruptStmt ab,
DavaFlowSet<T> set)
The next two methods take an abruptStmt as input along with a flowSet.
|
void |
addToImplicitContinues(DAbruptStmt ab,
DavaFlowSet<T> set) |
void |
clear()
implemented, but *very* inefficient.
|
DavaFlowSet<T> |
clone()
Clones the current FlowSet.
|
boolean |
contains(java.lang.Object obj)
Returns true if this FlowSet contains
obj . |
void |
copy(FlowSet<T> destFlow)
Copies the current FlowSet into dest.
|
void |
copyInternalDataFrom(DavaFlowSet<T> fromThis) |
void |
difference(FlowSet<T> otherFlow,
FlowSet<T> destFlow)
Returns the set difference (this intersect ~other) of this FlowSet and
other , putting result into dest . |
FlowSet<T> |
emptySet()
implemented, but inefficient.
|
boolean |
equals(java.lang.Object otherFlow)
Notice that the equals method only checks the equality of the elements of
the flow set DavaFlowSet also contains information regarding abrupt
control flow This should also be checked by invoking the
internalDataMatchesTo method
|
java.util.List<DavaFlowSet<T>> |
getBreakSet(java.lang.String label) |
java.util.List<DavaFlowSet<T>> |
getContinueSet(java.lang.String label) |
T |
getElementAt(int idx) |
int |
getElementCount() |
java.util.HashMap<java.io.Serializable,java.util.List<DavaFlowSet<T>>> |
getImplicitBreaks() |
java.util.HashMap<java.io.Serializable,java.util.List<DavaFlowSet<T>>> |
getImplicitContinues() |
java.util.List<DavaFlowSet<T>> |
getImplicitlyBrokenSets(ASTNode node) |
java.util.List<DavaFlowSet<T>> |
getImplicitlyContinuedSets(ASTNode node) |
boolean |
internalDataMatchesTo(java.lang.Object otherObj) |
void |
intersection(FlowSet<T> otherFlow,
FlowSet<T> destFlow)
Notice that the intersection method only merges the elements of the flow
set DavaFlowSet also contains information regarding abrupt control flow
This should also be merged using the copyInternalDataFrom method
|
boolean |
isEmpty()
Returns true if this FlowSet is the empty set.
|
java.util.Iterator<T> |
iterator()
returns an iterator over the elements of the flowSet.
|
void |
remove(int idx) |
void |
remove(java.lang.Object obj)
Removes
obj from this . |
int |
size()
Returns the size of the current FlowSet.
|
java.util.List<T> |
toList()
Returns a unbacked list of elements in this set.
|
java.lang.String |
toString() |
void |
union(FlowSet<T> otherFlow,
FlowSet<T> destFlow)
Notice that the union method only merges the elements of the flow set
DavaFlowSet also contains information regarding abrupt control flow This
should also be merged using the copyInternalDataFrom method
|
add, difference, hashCode, intersection, isSubSet, remove, union
protected T[] elements
public DavaFlowSet()
public DavaFlowSet(DavaFlowSet<T> other)
public DavaFlowSet<T> clone()
FlowSet
public FlowSet<T> emptySet()
AbstractFlowSet
public void clear()
AbstractFlowSet
public int size()
FlowSet
public boolean isEmpty()
FlowSet
public java.util.List<T> toList()
public void remove(java.lang.Object obj)
FlowSet
obj
from this
.public void remove(int idx)
public void union(FlowSet<T> otherFlow, FlowSet<T> destFlow)
public void intersection(FlowSet<T> otherFlow, FlowSet<T> destFlow)
intersection
in interface FlowSet<T>
intersection
in class AbstractFlowSet<T>
public void difference(FlowSet<T> otherFlow, FlowSet<T> destFlow)
FlowSet
other
, putting result into dest
.
dest
, other
and this
could be the
same object.difference
in interface FlowSet<T>
difference
in class AbstractFlowSet<T>
public boolean contains(java.lang.Object obj)
FlowSet
obj
.public boolean equals(java.lang.Object otherFlow)
equals
in class AbstractFlowSet<T>
public void copy(FlowSet<T> destFlow)
FlowSet
public void addToBreakList(java.lang.String labelBroken, DavaFlowSet<T> set)
public void addToContinueList(java.lang.String labelContinued, DavaFlowSet<T> set)
public void addToImplicitBreaks(DAbruptStmt ab, DavaFlowSet<T> set)
public void addToImplicitContinues(DAbruptStmt ab, DavaFlowSet<T> set)
public java.util.HashMap<java.io.Serializable,java.util.List<DavaFlowSet<T>>> getImplicitBreaks()
public java.util.HashMap<java.io.Serializable,java.util.List<DavaFlowSet<T>>> getImplicitContinues()
public java.util.List<DavaFlowSet<T>> getImplicitlyBrokenSets(ASTNode node)
public java.util.List<DavaFlowSet<T>> getImplicitlyContinuedSets(ASTNode node)
public void copyInternalDataFrom(DavaFlowSet<T> fromThis)
public boolean internalDataMatchesTo(java.lang.Object otherObj)
public java.util.List<DavaFlowSet<T>> getContinueSet(java.lang.String label)
public java.util.List<DavaFlowSet<T>> getBreakSet(java.lang.String label)
public java.lang.String toString()
toString
in class AbstractFlowSet<T>
public java.util.Iterator<T> iterator()
FlowSet
toList().iterator()
.public int getElementCount()
public T getElementAt(int idx)