JniEnvironment.StaticMethods.GetStaticMethodID Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetStaticMethodID(JniObjectReference, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>) |
Looks up a JNI static method ID using UTF-8 name and signature spans.
Use with |
| GetStaticMethodID(JniObjectReference, String, String) |
Resolves a JNI static method identifier. |
GetStaticMethodID(JniObjectReference, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)
Looks up a JNI static method ID using UTF-8 name and signature spans.
Use with "methodName"u8 literals to avoid string marshalling overhead.
public static Java.Interop.JniMethodInfo GetStaticMethodID(Java.Interop.JniObjectReference type, ReadOnlySpan<byte> name, ReadOnlySpan<byte> signature);
static member GetStaticMethodID : Java.Interop.JniObjectReference * ReadOnlySpan<byte> * ReadOnlySpan<byte> -> Java.Interop.JniMethodInfo
Parameters
- type
- JniObjectReference
A valid reference to the Java class used for method lookup.
- name
- ReadOnlySpan<Byte>
The Java method name encoded as modified UTF-8.
- signature
- ReadOnlySpan<Byte>
The JNI method descriptor encoded as modified UTF-8.
Returns
Valid JNI information for the static method.
Remarks
Both byte sequences must be terminated in memory. Each zero terminator can be inside the span or immediately after it, as with a u8 string literal. Their bytes are passed to JNI without transcoding or length arguments. A pending Java exception from lookup is converted to a managed exception.
Applies to
GetStaticMethodID(JniObjectReference, String, String)
Resolves a JNI static method identifier.
public static Java.Interop.JniMethodInfo GetStaticMethodID(Java.Interop.JniObjectReference type, string name, string signature);
static member GetStaticMethodID : Java.Interop.JniObjectReference * string * string -> Java.Interop.JniMethodInfo
Parameters
- type
- JniObjectReference
A valid reference to the Java class used for method lookup.
- name
- String
The Java method name.
- signature
- String
The JNI method descriptor.
Returns
Valid JNI information for the static method.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.