InstructionVisitor in dfa
[fedora-idea.git] / inspections / impl / com / intellij / codeInspection / dataFlow / instructions / EmptyInstruction.java
blobef223d34d2db2a4c9f09cecef66bd3866a6ddd8a
1 /*
2 * Created by IntelliJ IDEA.
3 * User: max
4 * Date: Jan 26, 2002
5 * Time: 10:48:42 PM
6 * To change template for new class use
7 * Code Style | Class Templates options (Tools | IDE Options).
8 */
9 package com.intellij.codeInspection.dataFlow.instructions;
11 import com.intellij.codeInspection.dataFlow.*;
14 public class EmptyInstruction extends Instruction {
15 public DfaInstructionState[] apply(DataFlowRunner runner, DfaMemoryState memState) {
16 Instruction nextInstruction = runner.getInstruction(getIndex() + 1);
17 DfaMemoryState nextState = memState; //.createCopy();
18 return new DfaInstructionState[] {new DfaInstructionState(nextInstruction, nextState)};
21 @Override
22 public DfaInstructionState[] accept(DataFlowRunner runner, DfaMemoryState stateBefore, InstructionVisitor visitor) {
23 return apply(runner, stateBefore);
26 public String toString() {
27 return "EMPTY";