Before calling a Java object's method from JNI, we need its signature. For example, the method
long myMethod (int n, String s, int[] arr);
is seen from JNI with the signature
(ILJAVA/LANG/STRING;[I)J
There are two parts to the signature. The first part is enclosed within the parentheses and represents the method's arguments. The second portion follows the closing parenthesis and represents the return type. The mapping between the Java type and C type is
Type Chararacter
boolean Z
byte B
char C
double D
float F
int I
long J
object L
short S
void V
array [
Note that to specify an object, the "L" is followed by the object's class name and ends with a semi-colon, ';' .
The javap utility (included with the JDK) is very useful to show the signature to be used in JNI.
public class java.awt.Label extends java.awt.Component {
public static final int LEFT;
/* I */
public static final int CENTER;
/* I */
public static final int RIGHT;
/* I */
java.lang.String text;
/* Ljava/lang/String; */
int alignment;
/* I */
static {};
/* ()V */
public java.awt.Label();
/* ()V */
public java.awt.Label(java.lang.String);
/* (Ljava/lang/String;)V */
public java.awt.Label(java.lang.String,int);
/* (Ljava/lang/String;I)V */
public void addNotify();
/* ()V */
java.lang.String constructComponentName();
/* ()Ljava/lang/String; */
public int getAlignment();
/* ()I */
public java.lang.String getText();
/* ()Ljava/lang/String; */
protected java.lang.String paramString();
/* ()Ljava/lang/String; */
public synchronized void setAlignment(int);
/* (I)V */
public void setText(java.lang.String);
/* (Ljava/lang/String;)V */
分享到:
相关推荐
JEDEC JESD33B:2004(R2018) Standard Method for Measuring and Using the Temperature Coefficient of Resistance to Determine the Temperature of a Metallization Line JEDEC JESD33B标准是由JEDECSolid ...
It mainly through the analysis of SPIG (the shortest path increment), NCC (the number of sub connected components) and VAR (the variance of the vertices in a connected component) to determine the ...
When the past no longer illuminates the future, people will wander in the dark
### 如何确定已安装在Catalyst 6500/6000系列交换机中的主管模块类型 #### 引言 本文档提供了一些简单的检查步骤,以便您能够确定Cisco Catalyst 6000或6500系列交换机所使用的主管引擎模块的类型。...
kmeans determine the frequency
"Determine-the-type-of-drive.rar_The Drive" 这个压缩包文件提供了关于识别计算机驱动器类型以及操作系统位数的方法。这里我们将深入探讨如何确定驱动器类型(硬盘、移动磁盘或光驱)以及如何辨别系统是32位还是64...
Enter a three-digit number to determine whether the number is a daffodil number or not, and output t.zip
This method returns a copy of the invoking Listing object sorted by the field name given in the parameter. Use an appropriate STL sorting function to sort the advertisements. To sort based on the ...
the Kariba dam is in desperate need of rehabilitation, otherwise the whole dam would collapse, putting 3.5 million people at risk. Aimed to look for the best strategy with the three options listed to ...
The Maximum Likelihood Estimator (MLE) and AE are two computational tools that are used to determine the parameters of a multipath channel. MLE requires some priori knowledge of the source signal and...
determine the location of the vehicle. A database management system is implemented at the remote server for the storage and management of transmitted data and a graphical user interface (GUI) is ...
Huffman published his paper "A Method for the Construction of Minimum-Redundancy Codes", and hence printed his name in the history of computer science. As a professor who gives the final exam problem...
An important method for the systematic evaluation of functions obeying a linear recurrence relation with respect to one of their parameters is to solve the relation recursively, making use of known ...
from which we derive high-order statistics as features for a classier to determine the presence of hidden information in an audio signal. Extensive experimental results for the Least Signicant Bit ...
This book demonstrates the inevitability of a continuously growing role of data in our society and it stresses that this role does not need to be threatening: to the contrary, collection and analysis ...
Riel has captured this elusive, subconscious list, and in doing so, has provided a set of metrics that help determine the quality of object-oriented models. Object-Oriented Design Heuristics offers ...
The model can be used not only to determine the reliability of the degraded systems in the context of multi-state functions, but also to obtain the states of the systems by calculating the system ...
To determine the value of a bond, one must first identify the sequence of cash flows it will generate, such as interest payments (coupons) and the principal repayment at maturity. Next, the ...