< prev index next >

src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java

Print this page

        

*** 19,47 **** * limitations under the License. */ package com.sun.org.apache.bcel.internal.generic; /** * ARRAYLENGTH - Get length of array * <PRE>Stack: ..., arrayref -&gt; ..., length</PRE> * ! * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> */ public class ARRAYLENGTH extends Instruction ! implements ExceptionThrower, StackProducer { /** Get length of array */ public ARRAYLENGTH() { ! super(com.sun.org.apache.bcel.internal.Constants.ARRAYLENGTH, (short)1); } /** @return exceptions this instruction may cause */ ! public Class[] getExceptions() { ! return new Class[] { com.sun.org.apache.bcel.internal.ExceptionConstants.NULL_POINTER_EXCEPTION }; } /** * Call corresponding visitor method(s). The order is: --- 19,53 ---- * limitations under the License. */ package com.sun.org.apache.bcel.internal.generic; + import com.sun.org.apache.bcel.internal.ExceptionConst; /** * ARRAYLENGTH - Get length of array * <PRE>Stack: ..., arrayref -&gt; ..., length</PRE> * ! * @version $Id: ARRAYLENGTH.java 1747278 2016-06-07 17:28:43Z britter $ */ public class ARRAYLENGTH extends Instruction ! implements ExceptionThrower, StackProducer, StackConsumer /* since 6.0 */ { ! /** Get length of array */ public ARRAYLENGTH() { ! super(com.sun.org.apache.bcel.internal.Const.ARRAYLENGTH, (short) 1); } + /** @return exceptions this instruction may cause */ ! @Override ! public Class<?>[] getExceptions() { ! return new Class[] { ! ExceptionConst.NULL_POINTER_EXCEPTION ! }; } /** * Call corresponding visitor method(s). The order is:
*** 49,59 **** * call methods according to the class hierarchy in descending order, * i.e., the most specific visitXXX() call comes last. * * @param v Visitor object */ ! public void accept(Visitor v) { v.visitExceptionThrower(this); v.visitStackProducer(this); v.visitARRAYLENGTH(this); } } --- 55,66 ---- * call methods according to the class hierarchy in descending order, * i.e., the most specific visitXXX() call comes last. * * @param v Visitor object */ ! @Override ! public void accept( final Visitor v ) { v.visitExceptionThrower(this); v.visitStackProducer(this); v.visitARRAYLENGTH(this); } }
< prev index next >