Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
JNIMethod Struct Reference
Inheritance diagram for JNIMethod:
Inheritance graph
[legend]
Collaboration diagram for JNIMethod:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 JNIMethod (const char *name, const char *sig, jmethodID methodID)
 ~JNIMethod ()
jvaluemarshallArgs (va_list args)
 Copies an argument list into a jvalue array.
 JNIMethod (const char *name, const char *sig, jmethodID methodID)
 ~JNIMethod ()
jvaluemarshallArgs (va_list args)

Public Attributes

jmethodID mMethodID
PRUint32 mArgCount
jni_typemArgTypes
jni_type mReturnType
char * mName
char * mSignature

Detailed Description

Definition at line 157 of file nsJNI.cpp.


Constructor & Destructor Documentation

JNIMethod::JNIMethod ( const char *  name,
const char *  sig,
jmethodID  methodID 
)

Definition at line 169 of file nsJNI.cpp.

Here is the call graph for this function:

Definition at line 175 of file nsJNI.cpp.

{
       if (mArgTypes != NULL)
              delete[] mArgTypes;
}
JNIMethod::JNIMethod ( const char *  name,
const char *  sig,
jmethodID  methodID 
)

Member Function Documentation

jvalue* JNIMethod::marshallArgs ( va_list  args)
jvalue * JNIMethod::marshallArgs ( va_list  args)

Copies an argument list into a jvalue array.

Definition at line 184 of file nsJNI.cpp.

{
       PRUint32 argCount = mArgCount;
       jni_type* argTypes = mArgTypes;
       jvalue* jargs = new jvalue[argCount];
       if (jargs != NULL) {
              for (int i = 0; i < argCount; i++) {
                     switch (argTypes[i]) {
                     case jobject_type:
                            jargs[i].l = va_arg(args, jobject);
                            break;
                     case jboolean_type:
                            jargs[i].z = va_arg(args, jboolean);
                            break;
                     case jbyte_type:
                            jargs[i].b = va_arg(args, jbyte);
                            break;
                     case jchar_type:
                            jargs[i].b = va_arg(args, jbyte);
                            break;
                     case jshort_type:
                            jargs[i].s = va_arg(args, jshort);
                            break;
                     case jint_type:
                            jargs[i].i = va_arg(args, jint);
                            break;
                     case jlong_type:
                            jargs[i].j = va_arg(args, jlong);
                            break;
                     case jfloat_type:
                            jargs[i].f = va_arg(args, jfloat);
                            break;
                     case jdouble_type:
                            jargs[i].d = va_arg(args, jdouble);
                            break;
                     }
              }
       }
       return jargs;
}

Member Data Documentation

Definition at line 159 of file nsJNI.cpp.

Definition at line 160 of file nsJNI.cpp.

Definition at line 158 of file nsJNI.cpp.

char * JNIMember::mName [inherited]

Definition at line 125 of file nsJNI.cpp.

Definition at line 161 of file nsJNI.cpp.

char * JNIMember::mSignature [inherited]

Definition at line 126 of file nsJNI.cpp.


The documentation for this struct was generated from the following files: