Microsoft SDK for Java

IRemoteField::
GetKind

The GetKind method of the IRemoteField interface returns the kind of this field as a bitmask of flags from the FIELD_KIND enumeration.

Syntax

HRESULT GetKind(FIELDKIND *pKind)

Parameters

[out] pKind Returns a bitmask of flags describing the kind of this field.

Return Value

S_OK Success.

Remarks

Field kinds are classified by the bit flags in the FIELDKIND enumeration, as shown below.

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 MyClass              // 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
  };
};

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