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 import com.sun.org.apache.bcel.internal.Const; |
24 |
25 |
25 /** |
26 /** |
26 * ALOAD - Load reference from local variable |
27 * ALOAD - Load reference from local variable |
27 * <PRE>Stack: ... -> ..., objectref</PRE> |
28 * <PRE>Stack: ... -> ..., objectref</PRE> |
28 * |
29 * |
29 * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> |
30 * @version $Id: ALOAD.java 1747278 2016-06-07 17:28:43Z britter $ |
30 */ |
31 */ |
31 public class ALOAD extends LoadInstruction { |
32 public class ALOAD extends LoadInstruction { |
32 /** |
|
33 * Empty constructor needed for the Class.newInstance() statement in |
|
34 * Instruction.readInstruction(). Not to be used otherwise. |
|
35 */ |
|
36 ALOAD() { |
|
37 super(com.sun.org.apache.bcel.internal.Constants.ALOAD, com.sun.org.apache.bcel.internal.Constants.ALOAD_0); |
|
38 } |
|
39 |
33 |
40 /** Load reference from local variable |
34 /** |
41 * @param n index of local variable |
35 * Empty constructor needed for the Class.newInstance() statement in |
42 */ |
36 * Instruction.readInstruction(). Not to be used otherwise. |
43 public ALOAD(int n) { |
37 */ |
44 super(com.sun.org.apache.bcel.internal.Constants.ALOAD, com.sun.org.apache.bcel.internal.Constants.ALOAD_0, n); |
38 ALOAD() { |
45 } |
39 super(Const.ALOAD, Const.ALOAD_0); |
|
40 } |
46 |
41 |
47 /** |
42 /** Load reference from local variable |
48 * Call corresponding visitor method(s). The order is: |
43 * @param n index of local variable |
49 * Call visitor methods of implemented interfaces first, then |
44 */ |
50 * call methods according to the class hierarchy in descending order, |
45 public ALOAD(final int n) { |
51 * i.e., the most specific visitXXX() call comes last. |
46 super(Const.ALOAD, Const.ALOAD_0, n); |
52 * |
47 } |
53 * @param v Visitor object |
48 |
54 */ |
49 /** |
55 public void accept(Visitor v) { |
50 * Call corresponding visitor method(s). The order is: |
56 super.accept(v); |
51 * Call visitor methods of implemented interfaces first, then |
57 v.visitALOAD(this); |
52 * call methods according to the class hierarchy in descending order, |
58 } |
53 * i.e., the most specific visitXXX() call comes last. |
|
54 * |
|
55 * @param v Visitor object |
|
56 */ |
|
57 @Override |
|
58 public void accept( final Visitor v ) { |
|
59 super.accept(v); |
|
60 v.visitALOAD(this); |
|
61 } |
59 } |
62 } |