CACAO
Data Structures | Public Member Functions | Private Attributes
NativeMethods Class Reference

Table containing all native methods registered with the VM. More...

Data Structures

class  comparator
 

Public Member Functions

void register_methods (Utf8String classname, const JNINativeMethod *methods, size_t count)
 Register native methods with the VM. More...
 
voidresolve_method (methodinfo *m)
 Resolves a native method, maybe from a dynamic library. More...
 
voidfind_registered_method (methodinfo *m)
 Try to find the given method in the native methods registered with the VM. More...
 

Private Attributes

Mutex _mutex
 
std::set< NativeMethod_methods
 

Detailed Description

Table containing all native methods registered with the VM.

Definition at line 132 of file native.hpp.

Member Function Documentation

void * NativeMethods::find_registered_method ( methodinfo m)

Try to find the given method in the native methods registered with the VM.

Parameters
mMethod structure.
Returns
Pointer to function if found, NULL otherwise.

Definition at line 380 of file native.cpp.

void NativeMethods::register_methods ( Utf8String  classname,
const JNINativeMethod *  methods,
size_t  count 
)

Register native methods with the VM.

This is done by inserting them into the native method table.

Parameters
classname
methodsNative methods array.
countNumber of methods in the array.

Definition at line 242 of file native.cpp.

void * NativeMethods::resolve_method ( methodinfo m)

Resolves a native method, maybe from a dynamic library.

Parameters
mMethod structure of the native Java method to resolve.
Returns
Pointer to the resolved method (symbol).

Definition at line 271 of file native.cpp.

Field Documentation

std::set<NativeMethod> NativeMethods::_methods
private

Definition at line 135 of file native.hpp.

Mutex NativeMethods::_mutex
private

Definition at line 134 of file native.hpp.


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