01: package net.sf.jdec.jvminstructions.commands;
02:
03: import net.sf.jdec.core.Operand;
04: import net.sf.jdec.core.OperandStack;
05: import net.sf.jdec.reflection.Behaviour;
06:
07: /*
08: * AConstNullCommand.java Copyright (c) 2006,07 Swaroop Belur
09: *
10: * This program is free software; you can redistribute it and/or
11: * modify it under the terms of the GNU General Public License
12: * as published by the Free Software Foundation; either version 2
13: * of the License, or (at your option) any later version.
14:
15: * This program is distributed in the hope that it will be useful,
16: * but WITHOUT ANY WARRANTY; without even the implied warranty of
17: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18: * GNU General Public License for more details.
19:
20: * You should have received a copy of the GNU General Public License
21: * along with this program; if not, write to the Free Software
22: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23: *
24: */
25: /***
26: * @author swaroop belur
27: * @since 1.2.1
28: */
29: public class AConstNullCommand extends AbstractInstructionCommand {
30:
31: public AConstNullCommand(Behaviour context) {
32: super (context);
33: }
34:
35: public int getSkipBytes() {
36: return 0;
37: }
38:
39: public void execute() {
40: OperandStack opStack = getContext().getOpStack();
41: Operand op = createOperand("null");
42: boolean r = false;//checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
43: if (r) {
44: if (opStack.size() > 0) {
45: java.lang.String str = opStack.getTopOfStack()
46: .getOperandValue();
47: str = str + op.getOperandValue();
48: op.setOperandValue(str);
49: }
50: }
51: opStack.push(op);
52: }
53: }
|