< prev index next >

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

Print this page




  98      */
  99     public static interface StackFrame {
 100         /**
 101          * Gets the <a href="ClassLoader.html#name">binary name</a>
 102          * of the declaring class of the method represented by this stack frame.
 103          *
 104          * @return the binary name of the declaring class of the method
 105          *         represented by this stack frame
 106          *
 107          * @jls 13.1 The Form of a Binary
 108          */
 109         public String getClassName();
 110 
 111         /**
 112          * Gets the name of the method represented by this stack frame.
 113          * @return the name of the method represented by this stack frame
 114          */
 115         public String getMethodName();
 116 
 117         /**

















 118          * Gets the declaring {@code Class} for the method represented by
 119          * this stack frame.
 120          *
 121          * @return the declaring {@code Class} of the method represented by
 122          * this stack frame
 123          *
 124          * @throws UnsupportedOperationException if this {@code StackWalker}
 125          *         is not configured with {@link Option#RETAIN_CLASS_REFERENCE
 126          *         Option.RETAIN_CLASS_REFERENCE}.
 127          */
 128         public Class<?> getDeclaringClass();
 129 
 130         /**
 131          * Returns the index to the code array of the {@code Code} attribute
 132          * containing the execution point represented by this stack frame.
 133          * The code array gives the actual bytes of Java Virtual Machine code
 134          * that implement the method.
 135          *
 136          * @return the index to the code array of the {@code Code} attribute
 137          *         containing the execution point represented by this stack frame,




  98      */
  99     public static interface StackFrame {
 100         /**
 101          * Gets the <a href="ClassLoader.html#name">binary name</a>
 102          * of the declaring class of the method represented by this stack frame.
 103          *
 104          * @return the binary name of the declaring class of the method
 105          *         represented by this stack frame
 106          *
 107          * @jls 13.1 The Form of a Binary
 108          */
 109         public String getClassName();
 110 
 111         /**
 112          * Gets the name of the method represented by this stack frame.
 113          * @return the name of the method represented by this stack frame
 114          */
 115         public String getMethodName();
 116 
 117         /**
 118          * Returns the <i>method descriptor</i> of the method represented by
 119          * this stack frame.  A method descriptor is a string representing the
 120          * types of parameters that the method takes, and a return descriptor,
 121          * representing the type of the value (if any) that the method returns
 122          * as defined by <cite>The Java&trade; Virtual Machine Specification</cite>.
 123          *
 124          * @return the method descriptor of the method represented by
 125          *         this stack frame
 126          *
 127          * @see java.lang.invoke.MethodType#fromMethodDescriptorString(String, ClassLoader)
 128          * @jvms 4.3.3 Method Descriptor
 129          *
 130          * @since 10
 131          */
 132         public String getMethodDescriptor();
 133 
 134         /**
 135          * Gets the declaring {@code Class} for the method represented by
 136          * this stack frame.
 137          *
 138          * @return the declaring {@code Class} of the method represented by
 139          * this stack frame
 140          *
 141          * @throws UnsupportedOperationException if this {@code StackWalker}
 142          *         is not configured with {@link Option#RETAIN_CLASS_REFERENCE
 143          *         Option.RETAIN_CLASS_REFERENCE}.
 144          */
 145         public Class<?> getDeclaringClass();
 146 
 147         /**
 148          * Returns the index to the code array of the {@code Code} attribute
 149          * containing the execution point represented by this stack frame.
 150          * The code array gives the actual bytes of Java Virtual Machine code
 151          * that implement the method.
 152          *
 153          * @return the index to the code array of the {@code Code} attribute
 154          *         containing the execution point represented by this stack frame,


< prev index next >