Microsoft SDK for Java

IRemoteContainerField::
GetFields

The GetFields method of the IRemoteContainerField interface returns an IJavaEnumRemoteField enumerator for the fields that are contained by this field and match given characteristics.

Syntax

HRESULT GetFields(IJavaEnumRemoteField **ppEnum, FIELDKIND ulKind, FIELDMODIFIERS ulModifiers, LPCOLESTR lpcszName)

Parameters

[out] **ppEnum Returns an enumerator for the fields that are contained by this field and match the given characteristics.
[in] ulKind A bitmask of flags indicating the kinds of fields to be included in the enumeration. Use zero to include all field kinds.
[in] ulModifiers A bitmask of flags indicating the modifiers of fields to be included in the enumeration. Use zero to include all field modifiers.
[in] lpcszName The name of the fields to be included in the enumeration. Use NULL to include all names.

Return Value

S_OK Success. 

E_NOFIELDS There are no matching fields in this container.

E_OUTOFMEMORY Insufficient memory.

Remarks

The characteristics of the fields included in the enumeration are determined by three parameters that specify the name of the field, the field modifiers bitmask of flags, and the field kind bitmask of flags. A NULL name is used to include all names. A bitmask of 0 (zero) is used to include all field modifiers. A bitmask of 0 (zero) is used to include all field kinds.

FIELDKIND enum: FIELD_KIND_DATA_OBJECT

Value: 0x0001

Description: An instance of a Java class.

FIELDKIND enum: FIELD_KIND_DATA_PRIMITIVE

Value: 0x0002

Description: An instance of a primitive Java data type.

FIELDKIND enum: FIELD_KIND_ARRAY

Value: 0x0004

Description: A Java array.

FIELDKIND enum: FIELD_KIND_CLASS

Value: 0x0008

Description: A Java class.

FIELDKIND enum: FIELD_KIND_METHOD

Value: 0x0010

Description: A Java method.

FIELDKIND enum: FIELD_KIND_LOCAL

Value: 0x1000

Description: A local variable in a Java method.

FIELDKIND enum: FIELD_KIND_PARAM

Value: 0x2000

Description: A parameter passed to a Java method

FIELDKIND enum: FIELD_KIND_THIS

Value: 0x4000

Description: A this object reference passed to a Java method.

FIELDKIND enum: FIELD_KIND_INNER_CLASS

Value: 0x8000

Description: A Java inner class.

If a field is not FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS, it might be a class field or an array element. This can be determined by getting the kind of the field’s container. For an array element, the container field’s kind is FIELD_KIND_ARRAY. For a class field, the container field’s kind is FIELD_KIND_CLASS.

The following Java code sample illustrates the FIELDKINDs for a sample Java class:

class <globals>              // FIELD_KIND_CLASS
{
class MySampleClass          // FIELD_KIND_CLASS
  {
  boolean bDone;             // FIELD_KIND_DATA_PRIMITIVE
  class BarClass             // FIELD_KIND_INNER_CLASS
    {
    String username[20];     // FIELD_KIND_ARRAY
    }
    BarClass mybar;          // FIELD_KIND_DATA_OBJECT
    int BarMethod();         // FIELD_KIND_METHOD
  };
};

FIELDMODIFIERS enum: FIELD_ACC_PUBLIC

Value: 0x0001

Description: Accessible from outside its package. This modifier can be applied to a class, field, inner class, interface, or method.

FIELDMODIFIERS enum: FIELD_ACC_PRIVATE

Value: 0x0002

Description: Accessible only within the defining class. This modifier can be applied to a field, inner class, or method.

FIELDMODIFIERS enum: FIELD_ACC_PROTECTED

Value: 0x0004

Description: Accessible only within this class and its subclasses. This modifier can be applied to a field, inner class, or method.

FIELDMODIFIERS enum: FIELD_ACC_STATIC

Value: 0x0008

Description: Accessible without an object reference. This modifier can be applied to a field, inner class, or method.

FIELDMODIFIERS enum: FIELD_ACC_FINAL

Value: 0x0010

Description: No subclassing from or assignment to is allowed. This modifier can be applied to any class, field, inner class, or method.

FIELDMODIFIERS enum: FIELD_ACC_SYNCHRONIZED

Value: 0x0020

Description: An object monitor lock is entered during a call to this method. This modifier can be applied to a method.

FIELDMODIFIERS enum: FIELD_ACC_VOLATILE

Value: 0x0040

Description: The value of this field cannot be cached. This modifier can be applied to a field.

FIELDMODIFIERS enum: FIELD_ACC_TRANSIENT

Value: 0x0080

Description: This field cannot be read or written by a persistent object manager. This modifier can be applied to a field.

FIELDMODIFIERS enum: FIELD_ACC_NATIVE

Value: 0x0100

Description: This method is implemented using native code. This modifier can be applied to a method.

FIELDMODIFIERS enum: FIELD_ACC_INTERFACE

Value: 0x0200

Description: This is an interface, not a class. This modifier is applied to an interface.

FIELDMODIFIERS enum: FIELD_ACC_ABSTRACT

Value: 0x0400

Description: This class or interface might not be instantiated. This modifier can be applied to a class, inner class, interface, or method.

FIELDMODIFIERS enum: FIELD_ACC_SUPER

Value: 0x0800

Description: Superclass methods are treated specially by the invokespecial bytecode instruction (used for backward compatibility). This modifier can be applied to a class, inner class, or interface.

FIELDMODIFIERS enum: FIELD_ACC_SYNTHETIC

Value: 0x1000

Description: Invented by the compiler. This modifier can be applied to an inner class.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.