19 * limitations under the License. |
19 * limitations under the License. |
20 */ |
20 */ |
21 |
21 |
22 package com.sun.org.apache.bcel.internal.generic; |
22 package com.sun.org.apache.bcel.internal.generic; |
23 |
23 |
24 |
|
25 /** |
24 /** |
26 * Denotes an unparameterized instruction to store a value into a local variable, |
25 * Denotes an unparameterized instruction to store a value into a local variable, |
27 * e.g. ISTORE. |
26 * e.g. ISTORE. |
28 * |
27 * |
29 * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> |
28 * @version $Id: StoreInstruction.java 1747278 2016-06-07 17:28:43Z britter $ |
30 */ |
29 */ |
31 public abstract class StoreInstruction extends LocalVariableInstruction |
30 public abstract class StoreInstruction extends LocalVariableInstruction implements PopInstruction { |
32 implements PopInstruction |
|
33 { |
|
34 /** |
|
35 * Empty constructor needed for the Class.newInstance() statement in |
|
36 * Instruction.readInstruction(). Not to be used otherwise. |
|
37 * tag and length are defined in readInstruction and initFromFile, respectively. |
|
38 */ |
|
39 StoreInstruction(short canon_tag, short c_tag) { |
|
40 super(canon_tag, c_tag); |
|
41 } |
|
42 |
31 |
43 /** |
32 /** |
44 * @param opcode Instruction opcode |
33 * Empty constructor needed for the Class.newInstance() statement in |
45 * @param c_tag Instruction number for compact version, ASTORE_0, e.g. |
34 * Instruction.readInstruction(). Not to be used otherwise. |
46 * @param n local variable index (unsigned short) |
35 * tag and length are defined in readInstruction and initFromFile, respectively. |
47 */ |
36 */ |
48 protected StoreInstruction(short opcode, short c_tag, int n) { |
37 StoreInstruction(final short canon_tag, final short c_tag) { |
49 super(opcode, c_tag, n); |
38 super(canon_tag, c_tag); |
50 } |
39 } |
51 |
40 |
52 /** |
41 |
53 * Call corresponding visitor method(s). The order is: |
42 /** |
54 * Call visitor methods of implemented interfaces first, then |
43 * @param opcode Instruction opcode |
55 * call methods according to the class hierarchy in descending order, |
44 * @param c_tag Instruction number for compact version, ASTORE_0, e.g. |
56 * i.e., the most specific visitXXX() call comes last. |
45 * @param n local variable index (unsigned short) |
57 * |
46 */ |
58 * @param v Visitor object |
47 protected StoreInstruction(final short opcode, final short c_tag, final int n) { |
59 */ |
48 super(opcode, c_tag, n); |
60 public void accept(Visitor v) { |
49 } |
61 v.visitStackConsumer(this); |
50 |
62 v.visitPopInstruction(this); |
51 |
63 v.visitTypedInstruction(this); |
52 /** |
64 v.visitLocalVariableInstruction(this); |
53 * Call corresponding visitor method(s). The order is: |
65 v.visitStoreInstruction(this); |
54 * Call visitor methods of implemented interfaces first, then |
66 } |
55 * call methods according to the class hierarchy in descending order, |
|
56 * i.e., the most specific visitXXX() call comes last. |
|
57 * |
|
58 * @param v Visitor object |
|
59 */ |
|
60 @Override |
|
61 public void accept( final Visitor v ) { |
|
62 v.visitStackConsumer(this); |
|
63 v.visitPopInstruction(this); |
|
64 v.visitTypedInstruction(this); |
|
65 v.visitLocalVariableInstruction(this); |
|
66 v.visitStoreInstruction(this); |
|
67 } |
67 } |
68 } |