use of de.fraunhofer.aisec.cpg.graph.HasType.TypeListener in project cpg by Fraunhofer-AISEC.
the class UnaryOperator method getsDataFromInput.
private boolean getsDataFromInput(TypeListener curr, TypeListener target) {
List<TypeListener> worklist = new ArrayList<>();
worklist.add(curr);
while (!worklist.isEmpty()) {
TypeListener tl = worklist.remove(0);
if (!checked.contains(tl)) {
checked.add(tl);
if (tl == target) {
return true;
}
if (curr instanceof HasType) {
worklist.addAll(((HasType) curr).getTypeListeners());
}
}
}
return false;
}
Aggregations