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.ExceptionConst; |
24 |
25 |
25 /** |
26 /** |
26 * IREM - Remainder of int |
27 * IREM - Remainder of int |
27 * <PRE>Stack: ..., value1, value2 -> result</PRE> |
28 * <PRE>Stack: ..., value1, value2 -> result</PRE> |
28 * |
29 * |
29 * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> |
30 * @version $Id: IREM.java 1747278 2016-06-07 17:28:43Z britter $ |
30 */ |
31 */ |
31 public class IREM extends ArithmeticInstruction implements ExceptionThrower { |
32 public class IREM extends ArithmeticInstruction implements ExceptionThrower { |
32 /** Remainder of ints |
|
33 */ |
|
34 public IREM() { |
|
35 super(com.sun.org.apache.bcel.internal.Constants.IREM); |
|
36 } |
|
37 |
33 |
38 /** @return exceptions this instruction may cause |
34 /** Remainder of ints |
39 */ |
35 */ |
40 public Class[] getExceptions() { |
36 public IREM() { |
41 return new Class[] { com.sun.org.apache.bcel.internal.ExceptionConstants.ARITHMETIC_EXCEPTION }; |
37 super(com.sun.org.apache.bcel.internal.Const.IREM); |
42 } |
38 } |
43 |
39 |
44 |
40 |
45 /** |
41 /** @return exceptions this instruction may cause |
46 * Call corresponding visitor method(s). The order is: |
42 */ |
47 * Call visitor methods of implemented interfaces first, then |
43 @Override |
48 * call methods according to the class hierarchy in descending order, |
44 public Class<?>[] getExceptions() { |
49 * i.e., the most specific visitXXX() call comes last. |
45 return new Class[] { |
50 * |
46 ExceptionConst.ARITHMETIC_EXCEPTION |
51 * @param v Visitor object |
47 }; |
52 */ |
48 } |
53 public void accept(Visitor v) { |
49 |
54 v.visitExceptionThrower(this); |
50 |
55 v.visitTypedInstruction(this); |
51 /** |
56 v.visitStackProducer(this); |
52 * Call corresponding visitor method(s). The order is: |
57 v.visitStackConsumer(this); |
53 * Call visitor methods of implemented interfaces first, then |
58 v.visitArithmeticInstruction(this); |
54 * call methods according to the class hierarchy in descending order, |
59 v.visitIREM(this); |
55 * i.e., the most specific visitXXX() call comes last. |
60 } |
56 * |
|
57 * @param v Visitor object |
|
58 */ |
|
59 @Override |
|
60 public void accept( final Visitor v ) { |
|
61 v.visitExceptionThrower(this); |
|
62 v.visitTypedInstruction(this); |
|
63 v.visitStackProducer(this); |
|
64 v.visitStackConsumer(this); |
|
65 v.visitArithmeticInstruction(this); |
|
66 v.visitIREM(this); |
|
67 } |
61 } |
68 } |