< prev index next >

src/java.base/share/classes/java/lang/LiveStackFrame.java

Print this page




  99      *
 100      * <p>Each entry on the operand stack can hold a value of any Java Virtual
 101      * Machine Type.
 102      * For a value of primitive type, the element in the returned array is
 103      * a {@link PrimitiveSlot} object; otherwise, the element is the {@code Object}
 104      * on the operand stack.
 105      *
 106      * @return the operand stack of this stack frame.
 107      */
 108     public Object[] getStack();
 109 
 110     /**
 111      * <em>UNSUPPORTED</em> This interface is intended to be package-private
 112      * or moved to an internal package.<p>
 113      *
 114      * Represents a local variable or an entry on the operand stack whose value is
 115      * of primitive type.
 116      */
 117     public abstract class PrimitiveSlot {
 118         /**





 119          * Returns the size, in bytes, of the slot.
 120          */
 121         public abstract int size();
 122 
 123         /**
 124          * Returns the int value if this primitive value is of size 4
 125          * @return the int value if this primitive value is of size 4
 126          *
 127          * @throws UnsupportedOperationException if this primitive value is not
 128          * of size 4.
 129          */
 130         public int intValue() {
 131             throw new UnsupportedOperationException("this " + size() + "-byte primitive");
 132         }
 133 
 134         /**
 135          * Returns the long value if this primitive value is of size 8
 136          * @return the long value if this primitive value is of size 8
 137          *
 138          * @throws UnsupportedOperationException if this primitive value is not




  99      *
 100      * <p>Each entry on the operand stack can hold a value of any Java Virtual
 101      * Machine Type.
 102      * For a value of primitive type, the element in the returned array is
 103      * a {@link PrimitiveSlot} object; otherwise, the element is the {@code Object}
 104      * on the operand stack.
 105      *
 106      * @return the operand stack of this stack frame.
 107      */
 108     public Object[] getStack();
 109 
 110     /**
 111      * <em>UNSUPPORTED</em> This interface is intended to be package-private
 112      * or moved to an internal package.<p>
 113      *
 114      * Represents a local variable or an entry on the operand stack whose value is
 115      * of primitive type.
 116      */
 117     public abstract class PrimitiveSlot {
 118         /**
 119          * Constructor.
 120          */
 121         PrimitiveSlot() {}
 122 
 123         /**
 124          * Returns the size, in bytes, of the slot.
 125          */
 126         public abstract int size();
 127 
 128         /**
 129          * Returns the int value if this primitive value is of size 4
 130          * @return the int value if this primitive value is of size 4
 131          *
 132          * @throws UnsupportedOperationException if this primitive value is not
 133          * of size 4.
 134          */
 135         public int intValue() {
 136             throw new UnsupportedOperationException("this " + size() + "-byte primitive");
 137         }
 138 
 139         /**
 140          * Returns the long value if this primitive value is of size 8
 141          * @return the long value if this primitive value is of size 8
 142          *
 143          * @throws UnsupportedOperationException if this primitive value is not


< prev index next >