private void check(final OpcodeNode startOpcodeNode,
final StackElement startStackElement) throws EnhanceException {
final Deque<OpcodeNode> toVisitQue = new LinkedList<OpcodeNode>();
final Deque<StackElement> stackElementQue = new LinkedList<StackElement>();
final Set<OpcodeNode> visited = new HashSet<OpcodeNode>();
OpcodeNode currentOpcodeNode = startOpcodeNode;
StackElement stackElement = startStackElement;
visited.add(currentOpcodeNode);
while (currentOpcodeNode != null) {
listener.currentOpcode(currentOpcodeNode);
currentOpcodeNode.setBeforeExecutionStackElement(stackElement);
stackElement = currentOpcodeNode.interprete();
if (currentOpcodeNode.isOwnedMethodCallOfOtherInstance()) {
listener.addOwnedMethodCallOfOtherInstance((OpcodeNodeMethod) currentOpcodeNode);
}
if (currentOpcodeNode.isDirectAccess()) {
notifyDirectAccess(currentOpcodeNode);
}
for (OpcodeNode next : currentOpcodeNode.getNextOpcodeNodeList()) {
if (visited.add(next)) {
toVisitQue.add(next);
stackElementQue.add(stackElement);
}
// stack change accepted