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

The baseclass for all array types that are proxy types for Java types. More...

Inheritance diagram for Codemesh.JuggerNET.JuggerNETProxyArray:
Inheritance graph
[legend]
Collaboration diagram for Codemesh.JuggerNET.JuggerNETProxyArray:
Collaboration graph
[legend]

Classes

class  Enumerator
 

Public Member Functions

void Dispose ()
 Releases the corresponding Java object, thereby making it eligible for garbage collection if no other references to the same object are held. More...
 
void Release ()
 Releases the connection between this proxy instance and the Java object without freeing the Java object. More...
 
override bool Equals (object obj)
 Implemented in terms of the Java equals() method. If the other object is not also a subclass of a JavaObject, the return value is always false. This is to ensure that the the results of a comparison is independent of the order, i.e. More...
 
override int GetHashCode ()
 Implemented in terms of the Java hashCode() method. More...
 
override string ToString ()
 Implemented in terms of the Java toString() method. More...
 
bool IsInstanceOf (JavaClass clazz)
 Returns true if the instance is type compatible with the given Java type. More...
 
bool IsSame (JavaProxy proxy)
 Returns true if the proxy instance wraps around the same Java object as the other proxy instance. More...
 
virtual IEnumerator GetEnumerator ()
 Provides the default implementation for reference type arrays. Primitive arrays override this method. More...
 

Protected Member Functions

 JuggerNETProxyArray (JavaMethod ctor, int size)
 
 JuggerNETProxyArray (JavaMethod ctor, JavaClass elemClazz, int size)
 
 JuggerNETProxyArray (JNIHandle jobject)
 
object GetElement (Type type, int index)
 The element accessor for arrays of reference types. More...
 
JNIHandle GetElement (int index)
 The element accessor for arrays of reference types that are leafs in the proxy type system. This method can dramatically enhance the performance of the element access because we can directly construct the return type through a constructor invocation rather than through using reflection. More...
 
void SetElement (int index, object elem)
 The element mutator for arrays of reference types. More...
 
void SetElement (int index, Type elemType, object elem)
 The element mutator for arrays of reference types that might require dynamic peer creation. More...
 

Static Protected Attributes

const int BOOLEAN = 2
 
const int BYTE = 4
 
const int CHAR = 8
 
const int DOUBLE = 16
 
const int FLOAT = 32
 
const int INT = 64
 
const int LONG = 128
 
const int SHORT = 256
 
const int OBJECT = 512
 

Properties

long JObject [get, set]
 A property giving access to the JNI object handle that represents the wrapped Java instance. More...
 
long JObjectDuplicate [get]
 A property representing a duplicated JNI object handle. More...
 
HandleRef Handle [get]
 
bool IsFixedSize [get]
 Always true. More...
 
bool IsReadOnly [get]
 Always false. More...
 
bool IsSynchronized [get]
 Always false. More...
 
int Length [get]
 The number of elements that the array can hold. More...
 
abstract int Rank [get]
 The rank (number of dimensions) of the array. More...
 
object SyncRoot [get]
 The synchronization object for the array (the array itself). More...
 
abstract Type ElementType [get]
 The .NET type of the array elements. More...
 
- Properties inherited from Codemesh.JuggerNET.JavaProxy
long JObject [get, set]
 A property representing the JNI object handle. More...
 
HandleRef Handle [get]
 A property representing the JNI object handle. More...
 
long JObjectDuplicate [get]
 A property representing a duplicated JNI object handle. More...
 

Detailed Description

The baseclass for all array types that are proxy types for Java types.

Member Function Documentation

◆ Dispose()

void Codemesh.JuggerNET.JuggerNETProxyArray.Dispose ( )
inline

Releases the corresponding Java object, thereby making it eligible for garbage collection if no other references to the same object are held.

◆ Equals()

override bool Codemesh.JuggerNET.JuggerNETProxyArray.Equals ( object  obj)
inline

Implemented in terms of the Java equals() method. If the other object is not also a subclass of a JavaObject, the return value is always false. This is to ensure that the the results of a comparison is independent of the order, i.e.

a.Equals( b ) == b.Equals( a )

which could not be guaranteed if we did special things for obj being of some special .NET type.

Parameters
objthe object we're comparing for equality.
Returns

◆ GetElement() [1/2]

JNIHandle Codemesh.JuggerNET.JuggerNETProxyArray.GetElement ( int  index)
inlineprotected

The element accessor for arrays of reference types that are leafs in the proxy type system. This method can dramatically enhance the performance of the element access because we can directly construct the return type through a constructor invocation rather than through using reflection.

Parameters
indexthe index
Returns

◆ GetElement() [2/2]

object Codemesh.JuggerNET.JuggerNETProxyArray.GetElement ( Type  type,
int  index 
)
inlineprotected

The element accessor for arrays of reference types.

Parameters
typethe .NET type of the element
indexthe index
Returns

References Codemesh.JuggerNET.JavaClass.GetTypedInstance().

◆ GetEnumerator()

virtual IEnumerator Codemesh.JuggerNET.JuggerNETProxyArray.GetEnumerator ( )
inlinevirtual

◆ GetHashCode()

override int Codemesh.JuggerNET.JuggerNETProxyArray.GetHashCode ( )
inline

Implemented in terms of the Java hashCode() method.

Returns
The object's Java hashcode.

◆ IsInstanceOf()

bool Codemesh.JuggerNET.JuggerNETProxyArray.IsInstanceOf ( JavaClass  clazz)
inline

Returns true if the instance is type compatible with the given Java type.

Parameters
clazzthe Java type.
Returns

Implements Codemesh.JuggerNET.JavaProxy.

References Codemesh.JuggerNET.JuggerNETProxyArray.JObject.

◆ IsSame()

bool Codemesh.JuggerNET.JuggerNETProxyArray.IsSame ( JavaProxy  proxy)
inline

Returns true if the proxy instance wraps around the same Java object as the other proxy instance.

Parameters
proxyThe other proxy instance.
Returns
True if the two proxies reference the same Java object.

Implements Codemesh.JuggerNET.JavaProxy.

◆ Release()

void Codemesh.JuggerNET.JuggerNETProxyArray.Release ( )
inline

Releases the connection between this proxy instance and the Java object without freeing the Java object.

Implements Codemesh.JuggerNET.JavaProxy.

◆ SetElement() [1/2]

void Codemesh.JuggerNET.JuggerNETProxyArray.SetElement ( int  index,
object  elem 
)
inlineprotected

The element mutator for arrays of reference types.

Parameters
indexthe index
elemthe element to set into the array at the given index.

◆ SetElement() [2/2]

void Codemesh.JuggerNET.JuggerNETProxyArray.SetElement ( int  index,
Type  elemType,
object  elem 
)
inlineprotected

The element mutator for arrays of reference types that might require dynamic peer creation.

Parameters
indexthe index
elemTypethe element type to be considered during peer creation.
elemthe element to set into the array at the given index.

◆ ToString()

override string Codemesh.JuggerNET.JuggerNETProxyArray.ToString ( )
inline

Implemented in terms of the Java toString() method.

Returns
the string representation of the object.

Property Documentation

◆ ElementType

abstract Type Codemesh.JuggerNET.JuggerNETProxyArray.ElementType
get

The .NET type of the array elements.

Referenced by Codemesh.JuggerNET.JuggerNETProxyArray.GetEnumerator().

◆ IsFixedSize

bool Codemesh.JuggerNET.JuggerNETProxyArray.IsFixedSize
get

Always true.

◆ IsReadOnly

bool Codemesh.JuggerNET.JuggerNETProxyArray.IsReadOnly
get

Always false.

◆ IsSynchronized

bool Codemesh.JuggerNET.JuggerNETProxyArray.IsSynchronized
get

Always false.

◆ JObject

long Codemesh.JuggerNET.JuggerNETProxyArray.JObject
getset

A property giving access to the JNI object handle that represents the wrapped Java instance.

Referenced by Codemesh.JuggerNET.JuggerNETProxyArray.IsInstanceOf().

◆ JObjectDuplicate

long Codemesh.JuggerNET.JuggerNETProxyArray.JObjectDuplicate
get

A property representing a duplicated JNI object handle.

◆ Length

int Codemesh.JuggerNET.JuggerNETProxyArray.Length
get

The number of elements that the array can hold.

Referenced by Codemesh.JuggerNET.shortArray.operator short[]().

◆ Rank

abstract int Codemesh.JuggerNET.JuggerNETProxyArray.Rank
get

The rank (number of dimensions) of the array.

◆ SyncRoot

object Codemesh.JuggerNET.JuggerNETProxyArray.SyncRoot
get

The synchronization object for the array (the array itself).


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

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