OSDN Git Service

save
[jcfa/jcfa.git] / jcfa / src / jp / igapyon / jcfa / util / JcfaWriteUtil.java
index ae20921..e8ca4f1 100644 (file)
@@ -10,8 +10,8 @@ import jp.igapyon.jcfa.vo.JcfaCode;
 import jp.igapyon.jcfa.vo.JcfaComment;
 import jp.igapyon.jcfa.vo.JcfaField;
 import jp.igapyon.jcfa.vo.JcfaMethod;
-import jp.igapyon.jcfa.vo.JcfaOperandStackNode;
 import jp.igapyon.jcfa.vo.JcfaUnit;
+import jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable;
 
 import org.apache.bcel.Constants;
 import org.apache.bcel.classfile.JavaClass;
@@ -138,14 +138,14 @@ public class JcfaWriteUtil {
 
                        switch (jcfaCode.getOpcode()) {
                        case Constants.ALOAD_0: {
-                               jcfaCode.getComment()
-                                               .getCommentList()
-                                               .add(jcfaMethod.getFrame().getLocalVariableList()
-                                                               .get(0).getName());
-                               final JcfaOperandStackNode operandStackNode = new JcfaOperandStackNode();
-                               jcfaMethod.getFrame().getOperandStack().push(operandStackNode);
-                               operandStackNode.setName(jcfaMethod.getFrame()
-                                               .getLocalVariableList().get(0).getName());
+                               final JcfaOSLocalVariable osLocalVariable = new JcfaOSLocalVariable();
+                               jcfaMethod.getFrame().getOperandStack().push(osLocalVariable);
+                               osLocalVariable.setLocalVariable(jcfaMethod.getFrame()
+                                               .getLocalVariableList().get(0));
+
+                               jcfaCode.getComment().getCommentList()
+                                               .add(osLocalVariable.getLocalVariable().getName());
+
                                break;
                        }
                        case Constants.RETURN: {