JuggerNET Runtime Library v3.6.54.0  3.6.54.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Codemesh.JuggerNET.NativeInterface Class Reference

A utility class that deals with all interactions with the native side. More...

Public Member Functions

static int ControlHeapMonitor (int control, GenericCallback collect)
 
static int Attach (long pJvm, long threadGroup, [In, MarshalAs(UnmanagedType.LPStr)] string name, bool bAsDaemon, long pEnv, out long result)
 
static int Call_Method (long method, long inst, int flags, int numParams, [In][MarshalAs(UnmanagedType.LPArray)] jvalue[] param, out jvalue result, out long exc)
 
static int Call_Method1 (IntPtr pCS)
 
static int DefineClass ([In, MarshalAs(UnmanagedType.LPStr)] string name, [In] byte[] code, int length, out long jclass, out long pClazz, out long exc)
 
static int Detach (long pJvm, long pEnv)
 
static int Destroy (long pJvm)
 
static long Duplicate (long inst)
 
static int Equals (long o1, long o2, out bool result, out long exc)
 
static int FindClass ([In, MarshalAs(UnmanagedType.LPStr)] string name, out long jclazz, out long pClazz, out long exc)
 
static int Free_Instance (long obj, long pEnv, [In, MarshalAs(UnmanagedType.LPStr)] string msg)
 
static int Free_Instance_Handle (HandleRef handle, [In, MarshalAs(UnmanagedType.LPStr)] string msg)
 
static int GetArrayLength (long arr, out int length, out long exc)
 
static bool GetBoolOption ([In, MarshalAs(UnmanagedType.LPStr)] string option)
 
static long GetClass (long obj)
 
static int GetField_bool_static (long fieldPtr, int flags, out bool result, out IntPtr exc)
 
static int SetField_bool_static (long fieldPtr, int flags, bool val, out IntPtr exc)
 
static int GetField_bool_instance (long fieldPtr, int flags, HandleRef h, out bool result, out IntPtr exc)
 
static int SetField_bool_instance (long fieldPtr, int flags, HandleRef h, bool val, out IntPtr exc)
 
static int GetField_byte_static (long fieldPtr, int flags, out byte result, out IntPtr exc)
 
static int SetField_byte_static (long fieldPtr, int flags, byte val, out IntPtr exc)
 
static int GetField_byte_instance (long fieldPtr, int flags, HandleRef h, out byte result, out IntPtr exc)
 
static int SetField_byte_instance (long fieldPtr, int flags, HandleRef h, byte val, out IntPtr exc)
 
static int GetField_char_static (long fieldPtr, int flags, out int result, out IntPtr exc)
 
static int SetField_char_static (long fieldPtr, int flags, int val, out IntPtr exc)
 
static int GetField_char_instance (long fieldPtr, int flags, HandleRef h, out int result, out IntPtr exc)
 
static int SetField_char_instance (long fieldPtr, int flags, HandleRef h, int val, out IntPtr exc)
 
static int GetField_double_static (long fieldPtr, int flags, out double result, out IntPtr exc)
 
static int SetField_double_static (long fieldPtr, int flags, double val, out IntPtr exc)
 
static int GetField_double_instance (long fieldPtr, int flags, HandleRef h, out double result, out IntPtr exc)
 
static int SetField_double_instance (long fieldPtr, int flags, HandleRef h, double val, out IntPtr exc)
 
static int GetField_float_static (long fieldPtr, int flags, out float result, out IntPtr exc)
 
static int SetField_float_static (long fieldPtr, int flags, float val, out IntPtr exc)
 
static int GetField_float_instance (long fieldPtr, int flags, HandleRef h, out float result, out IntPtr exc)
 
static int SetField_float_instance (long fieldPtr, int flags, HandleRef h, float val, out IntPtr exc)
 
static int GetField_int_static (long fieldPtr, int flags, out int result, out IntPtr exc)
 
static int SetField_int_static (long fieldPtr, int flags, int val, out IntPtr exc)
 
static int GetField_int_instance (long fieldPtr, int flags, HandleRef h, out int result, out IntPtr exc)
 
static int SetField_int_instance (long fieldPtr, int flags, HandleRef h, int val, out IntPtr exc)
 
static int GetField_long_static (long fieldPtr, int flags, out long result, out IntPtr exc)
 
static int SetField_long_static (long fieldPtr, int flags, long val, out IntPtr exc)
 
static int GetField_long_instance (long fieldPtr, int flags, HandleRef h, out long result, out IntPtr exc)
 
static int SetField_long_instance (long fieldPtr, int flags, HandleRef h, long val, out IntPtr exc)
 
static int GetField_short_static (long fieldPtr, int flags, out short result, out IntPtr exc)
 
static int SetField_short_static (long fieldPtr, int flags, short val, out IntPtr exc)
 
static int GetField_short_instance (long fieldPtr, int flags, HandleRef h, out short result, out IntPtr exc)
 
static int SetField_short_instance (long fieldPtr, int flags, HandleRef h, short val, out IntPtr exc)
 
static int GetField_object_static (long fieldPtr, int flags, out IntPtr result, out IntPtr exc)
 
static int SetField_object_static (long fieldPtr, int flags, HandleRef val, out IntPtr exc)
 
static int GetField_object_instance (long fieldPtr, int flags, HandleRef h, out IntPtr result, out IntPtr exc)
 
static int SetField_object_instance (long fieldPtr, int flags, HandleRef h, HandleRef val, out IntPtr exc)
 
static int GetIntOption ([In, MarshalAs(UnmanagedType.LPStr)] string option)
 
static long GetMemory (int what)
 
static long GetSuperClass (long clazz)
 
static int Get_String (long obj, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder trace, int size, out int required)
 
static string GetStringOption2 ([In, MarshalAs(UnmanagedType.LPStr)] string option1, [In, MarshalAs(UnmanagedType.LPStr)] string option2)
 
static TraceCallback GetTraceCallback ()
 
static int GetTraceLevel (int fac)
 
static int GetVerbosity ()
 
static int Init_Field (long theJclass, long theClassPtr, [In, MarshalAs(UnmanagedType.LPStr)] string name, [In, MarshalAs(UnmanagedType.LPStr)] string sig, int flags, out long fid, out long fPtr, out long exc)
 
static int Init_Method (long theJclass, long theClassPtr, [In, MarshalAs(UnmanagedType.LPStr)] string name, [In, MarshalAs(UnmanagedType.LPStr)] string sig, int flags, out long mid, out long mPtr, out long exc)
 
static bool IsInstanceOf (long inst, long clazz)
 
static bool IsInstanceOf (HandleRef inst, long clazz)
 
static bool IsInstanceOf (long inst, [In, MarshalAs(UnmanagedType.LPStr)] string classNameUtf)
 
static bool Kbhit ()
 
static int Load (bool bAcceptPreloadedJvm, out long lJvm)
 
static int Read ([In, MarshalAs(UnmanagedType.LPStr)] string configFile, [In, MarshalAs(UnmanagedType.LPStr)] string vers, [In, MarshalAs(UnmanagedType.LPStr)] string conf, [In, MarshalAs(UnmanagedType.LPStr)] string reserved)
 
static int SetConfigFile ([In, MarshalAs(UnmanagedType.LPStr)] string configFile, [In, MarshalAs(UnmanagedType.LPStr)] string vers, [In, MarshalAs(UnmanagedType.LPStr)] string conf, [In, MarshalAs(UnmanagedType.LPStr)] string reserved)
 
static void GetJvmLoader (int ctorVersion, [In, MarshalAs(UnmanagedType.LPStr)] string configFile, [In, MarshalAs(UnmanagedType.LPStr)] string vers, [In, MarshalAs(UnmanagedType.LPStr)] string conf, [In, MarshalAs(UnmanagedType.LPStr)] string reserved, bool bEnvOverrides, bool bDefaultJvm, int traceFacility, int traceLevel, out int error)
 
static int PeerSetTypeInfo ([In, MarshalAs(UnmanagedType.LPStr)] string javaPeerName, long inst, out long exc)
 
static int PeerSetField ([In, MarshalAs(UnmanagedType.LPStr)] string fieldName, long inst, jvalue val, int valType, out long exc)
 
static int PeerGetField ([In, MarshalAs(UnmanagedType.LPStr)] string fieldName, long inst, out jvalue val, int valType, out long exc)
 
static void SetAbortCallback (AbortCallback acb)
 
static void SetBoolOption ([In, MarshalAs(UnmanagedType.LPStr)] string option, bool val)
 
static void SetExitCallback (ExitCallback ecb)
 
static void SetIntOption ([In, MarshalAs(UnmanagedType.LPStr)] string option, int val)
 
static void SetStringOption ([In, MarshalAs(UnmanagedType.LPStr)] string option, [In, MarshalAs(UnmanagedType.LPStr)] string val)
 
static void SetStringOptionWide ([In, MarshalAs(UnmanagedType.LPStr)] string option, [In, MarshalAs(UnmanagedType.LPWStr)] string val)
 
static void SetStringOption2 ([In, MarshalAs(UnmanagedType.LPStr)] string option1, [In, MarshalAs(UnmanagedType.LPStr)] string option2, [In, MarshalAs(UnmanagedType.LPStr)] string val)
 
static void SetTraceCallback (TraceCallback tcb)
 
static void SetTraceLevel (int fac, int level)
 
static void SetVerbosity (int v)
 
static void SetVfprintfCallback (VfprintfCallback vcb)
 
static string GetClassNameForInstance (HandleRef inst)
 
static string GetClassNameForInstance (IntPtr inst)
 
static int CallMethod0ObjectArg (HandleRef inst, HandleRef method, [In] IntPtr cs)
 
static string CallStringMethod0ObjectArg (HandleRef inst, HandleRef method, IntPtr cs)
 
static int CallMethod1ObjectArg (HandleRef inst, HandleRef method, HandleRef oarg0, [In] IntPtr cs)
 
static string FromJavaString (HandleRef h)
 
static string FromJavaStringPtr (IntPtr inst)
 
static int GetStringLength (HandleRef h, out int result, out IntPtr exc)
 Returns the length of a Java string represented by the given handle. More...
 
static int IterableReset (HandleRef iterable, ref IntPtr current, out IntPtr exc)
 
static int IteratorMoveNext (HandleRef h, out bool result, ref IntPtr current, out IntPtr exc)
 

Static Public Member Functions

static int CollectGarbage (out int dummy1, out jvalue dummy2, IntPtr dummy3)
 A callback used to trigger .NET garbage collection from the Java side. More...
 
static void StartHeapMonitor ()
 
static void StopHeapMonitor ()
 
static jvalue CreateArray ([In, MarshalAs(UnmanagedType.LPStr)] string elementName, int length)
 
static jvalue CreateRefArray (long classPtr, long classID, int length)
 
static long FindClass (string name)
 
static int Free_Instance (long obj)
 Legacy entry point. Replaced by Free_Instance_Handle(). More...
 
static int Free_Instance (long obj, string msg)
 
static unsafe void GetArrayBytes (byteArray parrByte, byte[] narrByte)
 
static jvalue GetArrayElement (JuggerNETProxyArray arr, int index, int flags)
 
static jvalue GetArrayElement (long arr, int index, int flags)
 
static JNIHandle GetBootstrapClassLoader ()
 
static string GetClassClassName (long clazz)
 
static string GetExceptionMessage (long inst)
 
static int Get_Field (long field, long inst, int flags, out jvalue result, out long exc)
 
static unsafe int Set_Field (long field, long inst, int flags, [In] jvalue result, out long exc)
 
static string GetStackTrace (long exc)
 
static JuggerNETProxyException GetExceptionCause (JuggerNETProxyException jpe)
 
static string Get_String (long jstring)
 
static string GetStringOption (string option)
 
static int HashCode (long obj)
 
static void MonitorEnter (JavaProxy p)
 
static void MonitorExit (JavaProxy p)
 
static void SetSecurityManager (JavaMethod m, JuggerNETProxyObject p)
 
static void PeerCreate (string javaPeerName, out long inst)
 
static string PeerGetTypeInfo (long inst)
 
static int PeerSetField (string fieldName, long inst, jvalue val, int valType)
 
static int PeerSetStringField ([In, MarshalAs(UnmanagedType.LPStr)] string fieldName, long inst, string str)
 
static int PeerGetField (string fieldName, long inst, out jvalue val, int valType)
 
static string PeerGetStringField ([In, MarshalAs(UnmanagedType.LPStr)] string fieldName, long inst)
 
static void SetArrayElement (JuggerNETProxyArray arr, int index, int flags, jvalue val)
 
static void SetArrayElement (long arr, int index, int flags, jvalue val)
 
static unsafe void SetArrayBytes (byteArray parrByte, byte[] narrByte)
 
static jvalue ToJavaException (System.Exception e)
 
static string ToString (long inst)
 
static string[] GetSuperClassNamesForInstance (IntPtr inst)
 
static string[] GetSuperInterfaceNamesForInstance (IntPtr inst)
 
static IntPtr DuplicateHandle (HandleRef handle)
 
static IntPtr ToJavaString (string str)
 
static int ToJavaStringMarshaling (string str, int length, out IntPtr result)
 
static int ToJavaStringPinning (string str, int length, out IntPtr result)
 
static bool ToBooleanValue (JavaProxy jpo)
 
static IntPtr ToBoolean (bool b)
 
static char ToCharacterValue (JavaProxy jpo)
 
static IntPtr ToCharacter (char ch)
 
static int ToIntegerValue (JavaProxy jpo)
 
static IntPtr ToInteger (int i)
 
static long ToLongValue (JavaProxy jpo)
 
static IntPtr ToLong (long l)
 
static short ToShortValue (JavaProxy jpo)
 
static IntPtr ToShort (short s)
 
static float ToSingleValue (JavaProxy jpo)
 
static IntPtr ToSingle (float s)
 
static double ToDoubleValue (JavaProxy jpo)
 
static IntPtr ToDouble (double d)
 
static void CollectionCopyTo (Array array, int index, ICollection collection)
 
static int GetCollectionSize (JavaProxy jpo)
 
static void IterableReset (HandleRef iterable, ref IntPtr iterator)
 
static bool IteratorMoveNext (HandleRef iterator, ref IntPtr current)
 
static JNIHandle Deserialize (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 
static void Serialize (JavaProxy ser, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 

Static Public Attributes

static int DEFAULT_STRING_BUFFER_SIZE = 1024
 The default size for StringBuilder instances that are used for marshalling Java strings into .NET. More...
 
const int NETRT_SUCCESS = 0
 
const int NETRT_FAILURE = -1
 
static int CALL_COUNT = 0
 
const int TYPE_BOOLEAN = 2
 
const int TYPE_BYTE = 4
 
const int TYPE_CHAR = 8
 
const int TYPE_DOUBLE = 16
 
const int TYPE_FLOAT = 32
 
const int TYPE_INT = 64
 
const int TYPE_LONG = 128
 
const int TYPE_SHORT = 256
 
const int TYPE_OBJECT = 512
 
static int FORCED_GC_INTERVAL = -1
 
static bool XMOG_DEBUG = System.Environment.GetEnvironmentVariable( "XMOG_DEBUG" ) != null
 

Detailed Description

A utility class that deals with all interactions with the native side.

<exclude>

Member Function Documentation

◆ CollectGarbage()

static int Codemesh.JuggerNET.NativeInterface.CollectGarbage ( out int  dummy1,
out jvalue  dummy2,
IntPtr  dummy3 
)
inlinestatic

A callback used to trigger .NET garbage collection from the Java side.

Parameters
dummy1unused
dummy2unused
dummy3unused
Returns

◆ Free_Instance()

static int Codemesh.JuggerNET.NativeInterface.Free_Instance ( long  obj)
inlinestatic

Legacy entry point. Replaced by Free_Instance_Handle().

Parameters
obj
Returns

◆ GetStringLength()

static int Codemesh.JuggerNET.NativeInterface.GetStringLength ( HandleRef  h,
out int  result,
out IntPtr  exc 
)

Returns the length of a Java string represented by the given handle.

Parameters
h
result
exc
Returns

Member Data Documentation

◆ DEFAULT_STRING_BUFFER_SIZE

int Codemesh.JuggerNET.NativeInterface.DEFAULT_STRING_BUFFER_SIZE = 1024
static

The default size for StringBuilder instances that are used for marshalling Java strings into .NET.


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

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.