📄 instructions2.doc110.html
字号:
<html><head><title>VM Spec </title></head><body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000> <a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc109.html">Prev</a> | <a href="Instructions2.doc111.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="invokestatic"></a><h2>invokestatic</h2><a name="invokestatic.Operation"></a><b>Operation</b><br><a name="68901"></a>Invoke a class (<code>static</code>) method<p><Table Border="3"><tr><td><a name="68896"></a> <i>invokestatic</i><td><a name="87568"></a> <tr><td><a name="68898"></a> <i>indexbyte1</i><td><a name="87568"></a> <tr><td><a name="68900"></a> <i>indexbyte2</i><td><a name="87568"></a> </Table><Table><tr><td></Table><p><a name="invokestatic.Forms"></a><b>Forms</b><br><a name="68902"></a><i>invokestatic</i> = 184 (0xb8)<p><a name="invokestatic.Stack"></a><b>Stack</b><br><a name="68903"></a>...<em>, [</em><i>arg1</i><em>, [</em><i>arg2</i><em> </em>...<em>]] </em><img src="chars/arrwdbrt.gif"> ...<p><a name="invokestatic.Description"></a><b>Description</b><br><a name="68904"></a>The unsigned <i>indexbyte1</i> and <i>indexbyte2</i> are used to construct an index into the constant pool of the current class <a href="Overview.doc.html#17257">(§3.6)</a>, where the value of the index is (<i>indexbyte1</i> << 8) | <i>indexbyte2</i>. The item at that index in the constant pool must have the tag <code>CONSTANT_Methodref</code> <a href="ClassFile.doc.html#4723">(§4.4.2)</a>, a reference to a class name, a method name, and the method's descriptor <a href="ClassFile.doc.html#7035">(§4.3.3)</a>. The named method is resolved <a href="ConstantPool.doc.html#49425">(§5.2)</a>. The descriptor of the resolved method must be identical to the descriptor of one of the methods of the resolved class. The method must not be <code><init></code>, an instance initialization method <a href="Overview.doc.html#12174">(§3.8)</a>, or <code><clinit></code>, a class or interface initialization method <a href="Overview.doc.html#12174">(§3.8)</a>. It must be <code>static</code>, and therefore cannot be <code>abstract</code>. Finally, if the method is <code>protected</code> <a href="ClassFile.doc.html#1513">(§4.6)</a>, then it must be either a member of the current class or a member of a superclass of the current class.<p><a name="68920"></a>The constant pool entry representing the resolved method includes a direct reference to the code for the method, an unsigned byte <i>nargs</i> that may be zero, and the method's modifier information (see <a href="ClassFile.doc.html#12725">Table 4.4, "Method access and modifier flags"</a>).<p><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc109.html">Prev</a> | <a href="Instructions2.doc111.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><p><font size=-1>Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)<br><i><a href="Copyright.doc.html">Copyright © 1996 Sun Microsystems, Inc.</a>All rights reserved</i><br>Please send any comments or corrections to <a href="mailto:doug.kramer@sun.com">doug.kramer@sun.com</a></font></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -