import jp.igapyon.jcfa.vo.JcfaField;
import jp.igapyon.jcfa.vo.JcfaMethod;
import jp.igapyon.jcfa.vo.JcfaUnit;
-import jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable;
-import jp.igapyon.jcfa.vo.operandstack.JcfaOSNode;
-import jp.igapyon.jcfa.vo.operandstack.JcfaOSRef;
-import jp.igapyon.jcfa.vo.operandstack.JcfaOSString;
+import jp.igapyon.jcfa.vo.item.JcfaItem;
+import jp.igapyon.jcfa.vo.item.JcfaItemLocalVariable;
+import jp.igapyon.jcfa.vo.item.JcfaItemReference;
import org.apache.bcel.Constants;
import org.apache.bcel.classfile.JavaClass;
switch (jcfaCode.getOpcode()) {
case Constants.ALOAD_0: {
- final JcfaOSLocalVariable osLocalVariable = new JcfaOSLocalVariable();
+ final JcfaItemLocalVariable osLocalVariable = new JcfaItemLocalVariable();
jcfaMethod.getFrame().getOperandStack().push(osLocalVariable);
osLocalVariable.setLocalVariable(jcfaMethod.getFrame()
.getLocalVariableList().get(0));
break;
}
case Constants.GETSTATIC: {
- final JcfaOSRef osRef = new JcfaOSRef();
+ final JcfaItemReference osRef = new JcfaItemReference();
jcfaMethod.getFrame().getOperandStack().push(osRef);
- osRef.setClassName(JcfaUtil.getConstantFieldrefString(jc,
+ osRef.setObject(JcfaUtil.getConstantFieldrefString(jc,
codes[1], codes[2]));
- jcfaCode.getComment().getCommentList()
- .add(osRef.getClassName());
+ jcfaCode.getComment().getCommentList().add(osRef.getObject());
break;
}
case Constants.LDC: {
- final JcfaOSString osString = new JcfaOSString();
+ final JcfaItemReference osString = new JcfaItemReference();
jcfaMethod.getFrame().getOperandStack().push(osString);
- osString.setString(JcfaUtil.getConstantString(jc, codes[1]));
+ osString.setObject(JcfaUtil.getConstantString(jc, codes[1]));
jcfaCode.getComment().getCommentList()
- .add(osString.getString());
+ .add(osString.getObject());
}
break;
case Constants.INVOKEVIRTUAL:
jcfaCode.getComment().getCommentList()
.add("TODO get args count from signature.");
// get n args.
- final JcfaOSNode osNodeArg0 = jcfaMethod.getFrame()
+ final JcfaItem osNodeArg0 = jcfaMethod.getFrame()
.getOperandStack().pop();
- final JcfaOSRef osRef = (JcfaOSRef) jcfaMethod.getFrame()
- .getOperandStack().pop();
+ final JcfaItemReference osRef = (JcfaItemReference) jcfaMethod
+ .getFrame().getOperandStack().pop();
jcfaCode.getComment()
.getCommentList()
- .add("" + osRef.getClassName() + "#"
+ .add("" + osRef.getObject() + "#"
+ osNodeArg0.toString());
}