CACAO
Data Structures | Macros | Functions
native.hpp File Reference

Go to the source code of this file.

Data Structures

class  NativeLibrary
 Represents a native library. More...
 
class  NativeLibraries
 Table containing all loaded native libraries. More...
 
class  NativeLibraries::comparator
 
class  NativeMethod
 Represents a native method. More...
 
class  NativeMethods
 Table containing all native methods registered with the VM. More...
 
class  NativeMethods::comparator
 

Macros

#define NATIVE_METHODS_COUNT   sizeof(methods) / sizeof(JNINativeMethod)
 
#define NATIVE_LIBRARY_PREFIX   "lib"
 
#define NATIVE_LIBRARY_SUFFIX   ".so"
 

Functions

java_handle_tnative_new_and_init (classinfo *c)
 Registers a new native agent by specified by it's library name and with an optional options string. More...
 
java_handle_tnative_new_and_init_string (classinfo *c, java_handle_t *s)
 

Macro Definition Documentation

#define NATIVE_LIBRARY_PREFIX   "lib"

Definition at line 48 of file native.hpp.

#define NATIVE_LIBRARY_SUFFIX   ".so"

Definition at line 53 of file native.hpp.

#define NATIVE_METHODS_COUNT   sizeof(methods) / sizeof(JNINativeMethod)

Definition at line 45 of file native.hpp.

Function Documentation

java_handle_t* native_new_and_init ( classinfo c)

Registers a new native agent by specified by it's library name and with an optional options string.

Parameters
libraryName of the native agent library.
optionsThe options string or NULL if not specified. Registers a new native agent by specified by a path to it's library and with an optional options string.
pathPath of the native agent library.
optionsThe options string or NULL if not specified. Loads all registered native agents and in turn calls their exported start-up functions (Agent_OnLoad). If one of the agents reports an error during start-up, the loading is stopped.
Returns
True if all agents were loaded successfully, false if one of them was not found or reported an error.

Definition at line 729 of file native.cpp.

java_handle_t* native_new_and_init_string ( classinfo c,
java_handle_t s 
)

Definition at line 762 of file native.cpp.