Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

java::lang::reflect::Array Class Reference

The Array class provides static methods to dynamically create and access Java arrays. More...

#include <java_lang_reflect_Array.h>

Inheritance diagram for java::lang::reflect::Array:

Inheritance graph
[legend]
Collaboration diagram for java::lang::reflect::Array:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9,
  xmogBuildNumber = 2047
}
typedef ::xmog_java_array_template<
::java::lang::reflect::Array
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::java::lang::reflect::Array > > 
array2D

Static Public Member Functions

::java::lang::Object get (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object.
static bool getBoolean (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object, as a boolean.
static jbyte getByte (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object, as a byte.
static jchar getChar (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object, as a char.
static jdouble getDouble (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object, as a double.
static jfloat getFloat (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object, as a float.
static jint getInt (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object, as an int.
static jint getLength (const ::java::lang::Object &_array,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the length of the specified array object, as an int.
static jlong getLong (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object, as a long.
static jshort getShort (const ::java::lang::Object &_array, jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of the indexed component in the specified array object, as a short.
::java::lang::Object newInstance (const ::java::lang::Class &componentType, const ::xmog_java_int_array &dimensions,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Creates a new array with the specified component type and dimensions.
::java::lang::Object newInstance (const ::java::lang::Class &componentType, jint length,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Creates a new array with the specified component type and length.
static void set (const ::java::lang::Object &_array, jint index, const ::java::lang::Object &value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified new value.
static void setBoolean (const ::java::lang::Object &_array, jint index, bool z,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified boolean value.
static void setByte (const ::java::lang::Object &_array, jint index, jbyte b,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified byte value.
static void setChar (const ::java::lang::Object &_array, jint index, jchar c,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified char value.
static void setDouble (const ::java::lang::Object &_array, jint index, jdouble d,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified double value.
static void setFloat (const ::java::lang::Object &_array, jint index, jfloat f,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified float value.
static void setInt (const ::java::lang::Object &_array, jint index, jint i,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified int value.
static void setLong (const ::java::lang::Object &_array, jint index, jlong l,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified long value.
static void setShort (const ::java::lang::Object &_array, jint index, jshort s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sets the value of the indexed component of the specified array object to the specified short value.

Detailed Description

The Array class provides static methods to dynamically create and access Java arrays.

Array permits widening conversions to occur during a get or set operation, but throws an IllegalArgumentException if a narrowing conversion would occur.

Author:
Nakul Saraiya


Member Function Documentation

::java::lang::Object java::lang::reflect::Array::get const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object.

The value is automatically wrapped in an object if it has a primitive type.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the (possibly wrapped) value of the indexed component in the specified array

static bool java::lang::reflect::Array::getBoolean const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object, as a boolean.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value of the indexed component in the specified array

static jbyte java::lang::reflect::Array::getByte const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object, as a byte.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value of the indexed component in the specified array

static jchar java::lang::reflect::Array::getChar const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object, as a char.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value of the indexed component in the specified array

static jdouble java::lang::reflect::Array::getDouble const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object, as a double.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value of the indexed component in the specified array

static jfloat java::lang::reflect::Array::getFloat const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object, as a float.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value of the indexed component in the specified array

static jint java::lang::reflect::Array::getInt const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object, as an int.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value of the indexed component in the specified array

static jint java::lang::reflect::Array::getLength const ::java::lang::Object _array,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the length of the specified array object, as an int.

Parameters:
_array the array
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the length of the array

static jlong java::lang::reflect::Array::getLong const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object, as a long.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value of the indexed component in the specified array

static jshort java::lang::reflect::Array::getShort const ::java::lang::Object _array,
jint  index,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns the value of the indexed component in the specified array object, as a short.

Parameters:
_array the array
index the index
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the value of the indexed component in the specified array

::java::lang::Object java::lang::reflect::Array::newInstance const ::java::lang::Class componentType,
const ::xmog_java_int_array dimensions,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Creates a new array with the specified component type and dimensions.

If componentType represents a non-array class or interface, the new array has dimensions.length dimensions and  componentType  as its component type. If componentType represents an array class, the number of dimensions of the new array is equal to the sum of dimensions.length and the number of dimensions of componentType. In this case, the component type of the new array is the component type of componentType.

The number of dimensions of the new array must not exceed the number of array dimensions supported by the implementation (typically 255).

Parameters:
componentType the Class object representing the component type of the new array
dimensions an array of int types representing the dimensions of the new array
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the new array

::java::lang::Object java::lang::reflect::Array::newInstance const ::java::lang::Class componentType,
jint  length,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Creates a new array with the specified component type and length.

Invoking this method is equivalent to creating an array as follows: <blockquote>

                 int[] x = {length};
                 Array.newInstance(componentType, x);

</blockquote>

Parameters:
componentType the Class object representing the component type of the new array
length the length of the new array
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the new array

static void java::lang::reflect::Array::set const ::java::lang::Object _array,
jint  index,
const ::java::lang::Object value,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified new value.

The new value is first automatically unwrapped if the array has a primitive component type.

Parameters:
_array the array
index the index into the array
value the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

static void java::lang::reflect::Array::setBoolean const ::java::lang::Object _array,
jint  index,
bool  z,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified boolean value.

Parameters:
_array the array
index the index into the array
z the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

static void java::lang::reflect::Array::setByte const ::java::lang::Object _array,
jint  index,
jbyte  b,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified byte value.

Parameters:
_array the array
index the index into the array
b the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

static void java::lang::reflect::Array::setChar const ::java::lang::Object _array,
jint  index,
jchar  c,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified char value.

Parameters:
_array the array
index the index into the array
c the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

static void java::lang::reflect::Array::setDouble const ::java::lang::Object _array,
jint  index,
jdouble  d,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified double value.

Parameters:
_array the array
index the index into the array
d the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

static void java::lang::reflect::Array::setFloat const ::java::lang::Object _array,
jint  index,
jfloat  f,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified float value.

Parameters:
_array the array
index the index into the array
f the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

static void java::lang::reflect::Array::setInt const ::java::lang::Object _array,
jint  index,
jint  i,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified int value.

Parameters:
_array the array
index the index into the array
i the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

static void java::lang::reflect::Array::setLong const ::java::lang::Object _array,
jint  index,
jlong  l,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified long value.

Parameters:
_array the array
index the index into the array
l the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

static void java::lang::reflect::Array::setShort const ::java::lang::Object _array,
jint  index,
jshort  s,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Sets the value of the indexed component of the specified array object to the specified short value.

Parameters:
_array the array
index the index into the array
s the new value of the indexed component
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:19:35 2006 for JMS Courier for C++ by  doxygen 1.4.1