Wraps a Java class to allow access to it's static fields and methods using JNI.
More...
#include <JavaClass.h>
|
| JavaClass (JNIEnv *JNIEnvironment, const char *classPath) |
| Constructor taking the Java environment and the required class path. More...
|
|
virtual | ~JavaClass () |
|
bool | staticField (const char *fieldName, char **result) |
| Access a static String field of the Java class. More...
|
|
bool | staticField (const char *fieldName, int *result) |
| Access a static integer field of the Java class. More...
|
|
bool | staticMethod (const char *methodName, int **returnValue, const char *param01) |
| Call a static method with one parameter which returns an integer array within the Java class. More...
|
|
bool | staticMethod (const char *methodName, const char *param01, const char *param02) |
| Call a static method with two parameters which doesn't return a value within the Java class. More...
|
|
Wraps a Java class to allow access to it's static fields and methods using JNI.
Definition at line 42 of file JavaClass.h.
MaliSDK::JavaClass::JavaClass |
( |
JNIEnv * |
JNIEnvironment, |
|
|
const char * |
classPath |
|
) |
| |
Constructor taking the Java environment and the required class path.
Checks for the existance of the class and prints an error if it can't be found.
- Parameters
-
[in] | JNIEnvironment | A pointer to the JNI environment which allows interfacing with the Java Virtual Machine (JVM). Allows extensive interaction with the JVM including accessing Java classes, fields and methods. This pointer is provided as part of a JNI call from Java to C++. |
[in] | classPath | The class path to the Java class to wrap. |
Definition at line 32 of file JavaClass.cpp.
MaliSDK::JavaClass::~JavaClass |
( |
| ) |
|
|
virtual |
bool MaliSDK::JavaClass::staticField |
( |
const char * |
fieldName, |
|
|
char ** |
result |
|
) |
| |
Access a static String field of the Java class.
- Parameters
-
[in] | fieldName | The name of the static field to access. |
[out] | result | Pointer to where the String value of the static field will be placed. |
- Returns
- True if the operation was successful.
Definition at line 59 of file JavaClass.cpp.
bool MaliSDK::JavaClass::staticField |
( |
const char * |
fieldName, |
|
|
int * |
result |
|
) |
| |
Access a static integer field of the Java class.
- Parameters
-
[in] | fieldName | The name of the static field to access. |
[out] | result | Pointer to where the integer value of the static field will be placed. |
- Returns
- True if the operation was successful.
Definition at line 79 of file JavaClass.cpp.
bool MaliSDK::JavaClass::staticMethod |
( |
const char * |
methodName, |
|
|
int ** |
returnValue, |
|
|
const char * |
param01 |
|
) |
| |
Call a static method with one parameter which returns an integer array within the Java class.
- Parameters
-
[in] | methodName | The name of the static method to call. |
[out] | returnValue | Pointer to an integer array where the return value of the static method will be placed. |
[in] | param01 | A parameter that will be passed to the static method of the Java class. |
- Returns
- True if the operation was successful.
Definition at line 92 of file JavaClass.cpp.
bool MaliSDK::JavaClass::staticMethod |
( |
const char * |
methodName, |
|
|
const char * |
param01, |
|
|
const char * |
param02 |
|
) |
| |
Call a static method with two parameters which doesn't return a value within the Java class.
- Parameters
-
[in] | methodName | The name of the static method to call. |
[in] | param01 | The first parameter that will be passed to the static method of the Java class. |
[in] | param02 | The second parameter that will be passed to the static method of the Java class. |
- Returns
- True if the operation was successful.
Definition at line 120 of file JavaClass.cpp.
char* MaliSDK::JavaClass::classPath |
|
private |
bool MaliSDK::JavaClass::intialized |
|
private |
jclass MaliSDK::JavaClass::jClass |
|
private |
JNIEnv* MaliSDK::JavaClass::JNIEnvironment |
|
private |
The documentation for this class was generated from the following files:
- /mnt/d/working/gitlab/opengles-sdk-android/samples/advanced_samples/common_native/inc/JavaClass.h
- /mnt/d/working/gitlab/opengles-sdk-android/samples/advanced_samples/common_native/src/JavaClass.cpp