docs/technotes/guides/jni/spec/functions.html

Print this page

        

*** 1883,1893 **** *env, jclass clazz,<br /> const char *name, const char *sig);</code></p> <p>Returns the method ID for an instance (nonstatic) method of a class or interface. The method may be defined in one of ! the <code>clazz</code>’s superclasses and inherited by <code>clazz</code>. The method is determined by its name and signature.</p> <p><code>GetMethodID()</code> causes an uninitialized class to be initialized.</p> --- 1883,1893 ---- *env, jclass clazz,<br /> const char *name, const char *sig);</code></p> <p>Returns the method ID for an instance (nonstatic) method of a class or interface. The method may be defined in one of ! the <code>clazz</code>’s supertypes and inherited by <code>clazz</code>. The method is determined by its name and signature.</p> <p><code>GetMethodID()</code> causes an uninitialized class to be initialized.</p>
*** 2405,2420 **** <p>The <em class= "cEmphasis">CallNonvirtual&lt;type&gt;Method</em> families of routines and the <em>Call&lt;type&gt;Method</em> families of routines are different. <em class= "cEmphasis">Call&lt;type&gt;Method</em> routines invoke the method ! based on the class of the object, while <em class= "cEmphasis">CallNonvirtual&lt;type&gt;Method</em> routines invoke the method based on the class, designated by the <code class= "cCode">clazz</code> parameter, from which the method ID is obtained. The method ID must be obtained from the real class of the ! object or from one of its superclasses.</p> <h4>CallNonvirtual&lt;type&gt;Method Routines</h4> <p>Programmers place all arguments that are to be --- 2405,2422 ---- <p>The <em class= "cEmphasis">CallNonvirtual&lt;type&gt;Method</em> families of routines and the <em>Call&lt;type&gt;Method</em> families of routines are different. <em class= "cEmphasis">Call&lt;type&gt;Method</em> routines invoke the method ! based on the class or interface of the object, while <em class= "cEmphasis">CallNonvirtual&lt;type&gt;Method</em> routines invoke the method based on the class, designated by the <code class= "cCode">clazz</code> parameter, from which the method ID is obtained. The method ID must be obtained from the real class of the ! object or from one of its supertypes.</p> ! ! <p><em class="cEmphasis">CallNonvirtual&lt;type&gt;Method</em> routines are the mechanism for invoking <em>"default interface methods"</em> introduced in Java 8.</p> <h4>CallNonvirtual&lt;type&gt;Method Routines</h4> <p>Programmers place all arguments that are to be