// Get the current state.
units.add(Jimple.v().newTableSwitchStmt(currentStateLocal, 0,
numberOfStates - 1, stateStmtList, errorStmt));
// Generate code for each state.
for (Iterator states = entity.entityList().iterator(); states
.hasNext();) {
State state = (State) states.next();
System.out.println("state " + state.getName());
Stmt startStmt = (Stmt) stateToStartStmt.get(state);