Working with MS VM
 
 

Microsoft VM   Previous VM Next
Java Language Debug Interfaces   Previous VM Next

 

Static Information Interfaces

Static information on a Java process is available through the IRemoteField hierarchy of interfaces. These interfaces represent fields that are members of classes. These fields can be methods, objects, inner classes, or nested class definitions. Because all the attributes of a field are constant during its lifetime, this information can be cached by the debugger.

The static information interfaces consist primarily of the IRemoteField interface and a collection of other interfaces designed for a specific Java object (primitive data types, arrays, classes, methods, and so on) that inherit from IRemoteField or from other interfaces that extend IRemoteField.

IRemoteField : IUnknown

The IRemoteField hierarchy of interfaces represents fields that are members of classes. These fields can be methods, objects, or nested class definitions. You can think of global classes (classes not defined within other classes) as being fields of a global class. This is shown in the following example.

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

Because all the attributes of a field are constant during its lifetime, the debugger can cache this information until the class containing the field is unloaded. 

IRemoteField::GetName

The GetName method returns the identifier (the class, variable, or method name) for this field.

HRESULT GetName(LPOLESTR *ppszName)

Parameter Description
[out] ppszName Returns the identifier for this field; for example, "FooClass", "m_i", "m_bar", "Method", and so on.

IRemoteField::GetKind

The GetKind method returns the kind (FIELD_KIND enum) of this field.

HRESULT GetKind(FIELDKIND *pKind)

Parameter Description
[out] pKind Returns the kind of this field.

Remarks

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

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

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

IRemoteField::GetType

The GetType method returns an IRemoteField object that represents the type of this field.

HRESULT GetType(IRemoteField **ppType)

ParameterDescription
[out] ppType Returns an IRemoteField from which the type of this field can be determined.

Remarks

The relationship between a field and its type depends on the FIELD_KIND of the field. The type will be either a class type or a Java native object type (boolean, short, integer, long, and so on). When this method is called on a global container field, the method returns S_OK and the IRemoteField object returned representing the type is NULL.

For primitive data objects, if the GetType method is called on the returned IRemoteField, this method call will return the class corresponding to the type of the object. For a boolean, it will return a boolean class. Calling GetName will returns the Unicode string “boolean” and calling GetKind will return FIELD_KIND_CLASS.

For array data objects, if the GetType method is called on the returned IRemoteField, this method call will return another IRemoteField for element type of the array. The element type can be another array, a class, or a primitive class (boolean, byte, char, and so on). Calling GetKind on this returned IRemoteField will return either the FIELD_KIND_CLASS bit set (for an arrays of classes or an array of primitives) or the FIELD_KIND_ARRAY bit set for an array of arrays.

There are two techniques that can be used to determine the element type of an array of primitives.

The debugger can call GetName on the IRemoteField of the element type of the array, which returns the primitive class name. The returned value for GetName can be compared with the eight primitive class names.

A debugger can compare the IUnknown pointer for the IRemoteField of the element type to the IUnknown pointer for a primitive class. The IUnknown pointer for this element type can be returned by calling the QueryInterface on the IRemoteField. The IUnknown pointer for the primitive classes can be determined by calling IRemoteProcess::FindClass for the primitive class (boolean, byte, char, and so on) to retrieve an IRemoteClassField. The IUnknown pointer for a primitive class can be returned by calling the QueryInterface on the IRemoteClassField. For efficiency when using this technique, a debugger might

IRemoteField::GetContainer

The GetContainer method returns an IRemoteContainerField object representing the class that contains the field.

HRESULT GetContainer(IRemoteContainerField **ppContainer)

ParameterDescription
[out] ppContainer Returns the field representing the class that contains the field. For example, calling this method on the field that represents "username" described under the GetKind method will return the field for its containing class "BarClass".

IRemoteField::GetModifiers

The GetModifiers method returns a bitmask of flags containing the modifiers (FIELDMODIFIERS enum) for this field. If a bit is set, the type is modified in that way.

HRESULT GetModifiers(ULONG *pulModifiers)

ParameterDescription
[out] pulModifiers Returns a bitmask of flags containing the modifiers for this type.

Remarks

Fields also have a set of modifiers contained in a flag attribute bitmask. These modifier bits are the same as those used in the access_flags field of the class file header. These bitmasks are defined in Java Virtual Machine specification published by JavaSoft.

These modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteDataField : IRemoteField

The IRemoteDataField object represents a field that is not a method or a class definition. This interface inherits from IRemoteField. This interface is not used except as a base interface for IRemoteArrayField.

Because all the attributes of a field are constant during its lifetime, the debugger can cache this information until the class containing the field is unloaded.

IRemoteDataField::GetName

The GetName method returns the identifier (the variable name) for this data field.

HRESULT GetName(LPOLESTR *ppszName)

ParameterDescription
[out] ppszName Returns a Unicode string identifier for this data field.

IRemoteDataField::GetKind

The GetKind method returns the kind (FIELD_KIND enum) of this field.

HRESULT GetKind(FIELDKIND *pKind)

ParameterDescription
[out] pKind Returns the kind of this data field, which is FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY.

Remarks

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ored) with FIELD_KIND_PARAM.

IRemoteDataField::GetType

The GetType method returns an IRemoteField object that represents the type of this field.

HRESULT GetType(IRemoteField **ppType)

Parameter Description
[out] ppType Returns an IRemoteField from which the type of this field can be determined.

Remarks

The relationship between a field and its type depends on the FIELD_KIND of the field. The type will be either a class type or a Java native object type (boolean, short, integer, long, and so on).

IRemoteDataField::GetContainer

The GetContainer method returns an IRemoteContainerField object representing the class that contains the field.

HRESULT GetContainer(IRemoteContainerField **ppContainer)

ParameterDescription
[out] ppContainer Returns the field representing the class that contains the data field.

IRemoteDataField::GetModifiers

The GetModifiers method returns a bitmask of flags containing the modifiers (FIELDMODIFIERS enum) for this field. If a bit is set, the type is modified in that way.

HRESULT GetModifiers(ULONG *pulModifiers)

ParameterDescription
[out] pulModifiers Returns a bitmask of flags containing the modifiers for this type.

Remarks

Fields also have a set of modifiers contained in a flag attribute bitmask. These modifier bits are the same as those used in the access_flags field of the class file header. These bitmasks are defined in Java Virtual Machine specification published by JavaSoft.

These modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteArrayField : IRemoteDataField

The IRemoteArrayField object represents arrays (special data fields). The only major difference between data and arrays (IRemoteDataField and IRemoteArrayField) is that arrays have a size. This interface inherits from IRemoteDataField.

Because all the attributes of a field are constant during its lifetime, the debugger can cache this information until the class containing the array field is unloaded.

A debugger application cannot access the elements of an array through an IRemoteArrayField because the field is not bound to an instance of the array. The IRemoteArrayObject interface can be used to extract the elements from an instance of an array.

IRemoteArrayField::GetName

The GetName method returns the identifier (the variable name) for this field.

HRESULT GetName(LPOLESTR *ppszName)

ParameterDescription
[out] ppszName Returns a Unicode string identifier for this field.

IRemoteArrayField::GetKind

The GetKind method returns the kind (FIELD_KIND enum) of this field.

HRESULT GetKind(FIELDKIND *pKind)

ParameterDescription
[out] pKind Returns the kind of this field that has the FIELD_KIND_ARRAY bitmask set.

Remarks

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following 0two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

IRemoteArrayField::GetType

The GetType method returns an IRemoteField object that represents the type of this field.

HRESULT GetType(IRemoteField **ppType)

ParameterDescription
[out] ppType Returns an IRemoteField from which the type of this field can be determined.

Remarks

The relationship between a field and its type depends on the FIELD_KIND of the field. The type will be either a class type or a Java native object type (boolean, short, integer, long, and so on).

IRemoteArrayField::GetContainer

The GetContainer method returns an IRemoteContainerField object representing the class that contains the field.

HRESULT GetContainer(IRemoteContainerField **ppContainer)

ParameterDescription
[out] ppContainer Returns the field representing the class that contains the array.

IRemoteArrayField::GetModifiers

The GetModifiers method returns a bitmask of flags containing the modifiers (FIELDMODIFIERS enum) for this field. If a bit is set, the type is modified in that way.

HRESULT GetModifiers(ULONG *pulModifiers)

ParameterDescription
[out] pulModifiers Returns a bitmask of flags containing the modifiers for this type.

Remarks

Fields also have a set of modifiers contained in a flag attribute bitmask. These modifier bits are the same as those used in the access_flags field of the class file header. These bitmasks are defined in Java Virtual Machine specification published by JavaSoft.

These modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteArrayField::GetSize

The GetSize method returns the number of elements in an array.

HRESULT GetSize(ULONG *pcElements)

ParameterDescription
[out] pcElements Returns the number of elements in an array.

IRemoteContainerField : IRemoteField

The IRemoteContainerField represents fields that contain other fields. This interface inherits from IRemoteField.

Because all the attributes of a field are constant during its lifetime, the debugger can cache this information until the class containing the container field is unloaded.

IRemoteContainerField::GetName

The GetName method returns the identifier (the class, variable, or method name) for this field.

HRESULT GetName(LPOLESTR *ppszName)

Parameter Description
[out] ppszName Returns the identifier for this field; for example, "FooClass".

IRemoteContainerField::GetKind

The GetKind method returns the kind (FIELD_KIND enum) of this field.

HRESULT GetKind(FIELDKIND *pKind)

Parameter Description
[out] pKind Returns the kind of this field.

Remarks

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ored) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

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

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

IRemoteContainerField::GetType

The GetType method returns an IRemoteField object that represents the type of this field.

HRESULT GetType(IRemoteField **ppType)

ParameterDescription
[out] ppType Returns an IRemoteField from which the type of this field can be determined.

Remarks

The relationship between a field and its type depends on the FIELD_KIND of the field. The type will be either a class type or a Java native object type (boolean, short, integer, long, and so on). When this method is called on a global container field, the method returns S_OK and the IRemoteField object returned representing the type is NULL.

IRemoteContainerField::GetContainer

The GetContainer method returns an IRemoteContainerField object representing the class that contains the field.

HRESULT GetContainer(IRemoteContainerField **ppContainer)

ParameterDescription
[out] ppContainer Returns the field representing the class that contains the field. For example, calling this method on the field that represents "username" described under the GetKind method will return the field for its containing class "BarClass".

IRemoteContainerField::GetModifiers

The GetModifiers method returns a bitmask of flags containing the modifiers (FIELDMODIFIERS enum) for this field. If a bit is set, the type is modified in that way.

HRESULT GetModifiers(ULONG *pulModifiers)

ParameterDescription
[out] pulModifiers Returns a bitmask of flags containing the modifiers for this type.

Remarks

Fields also have a set of modifiers contained in a flag attribute bitmask. These modifier bits are the same as those used in the access_flags field of the class file header. These bitmasks are defined in Java Virtual Machine specification published by JavaSoft.

These modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteContainerField::GetFields

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

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

ParameterDescription
[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 0 (zero) to include all field kinds.
[in] ulModifiers A bitmask of flags indicating the modifiers of fields to be included in the enumeration. Use 0 (zero) to include all field modifiers.
[in] lpcszName The name of the field to be included in the enumeration. Use NULL to include all names.

Remarks

The characteristics are determined by three parameters passed to the method that specify the name of the field, the field modifiers bitmask, and the field kind. A null parameter passed for the name is used to include all names. A bitmask of 0is used to include all field modifiers. A FIELD_KIND of 0 is used to include all field kinds.

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField object can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

The field modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteClassField : IRemoteContainerField

The IRemoteClassField represents a class definition. This interface inherits from IRemoteContainerField.

Because all the attributes of a field are constant during its lifetime, the debugger can cache this information until the class containing the field is unloaded.

IRemoteClassField::GetName

The GetName method returns the identifier (the class name) for this field.

HRESULT GetName(LPOLESTR *ppszName)

ParameterDescription
[out] ppszName Returns the identifier for this field; for example, "FooClass".

IRemoteClassField::GetKind

The GetKind method returns the kind (FIELD_KIND enum) of this field.

HRESULT GetKind(FIELDKIND *pKind)

ParameterDescription
[out] pKind Returns the kind of this field, FIELD_KIND_CLASS.

Remarks

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

IRemoteClassField::GetType

The GetType method returns an IRemoteField object that represents the type of this field.

HRESULT GetType(IRemoteField **ppType)

ParameterDescription
[out] ppType Returns NULL for a Class field.

Remarks

The relationship between a field and its type depends on the FIELD_KIND of the field. The type will be either a class type or a Java native object type (boolean, short, integer, long, and so on). When this method is called on a global container field, the method returns S_OK and the IRemoteField object returned representing the type is NULL.

IRemoteClassField::GetContainer

The GetContainer method returns an IRemoteContainerField object representing the class that contains the field.

HRESULT GetContainer(IRemoteContainerField **ppContainer)

ParameterDescription
[out] ppContainer Returns the field representing the class that contains the field. For example, calling this method on the field that represents "username" described under the GetKind method will return the field for its containing class "BarClass".

IRemoteClassField::GetModifiers

The GetModifiers method returns a bitmask of flags containing the modifiers (FIELDMODIFIERS enum) for this field. If a bit is set, the type is modified in that way.

HRESULT GetModifiers(ULONG *pulModifiers)

Parameter Description
[out] pulModifiers Returns a bitmask of flags containing the modifiers for this type.

Remarks

Fields also have a set of modifiers contained in a flag attribute bitmask. These modifier bits are the same as those used in the access_flags field of the class file header. These bitmasks are defined in Java Virtual Machine specification published by JavaSoft.

These modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteClassField::GetFields

The GetFields method returns an enumerator (IJavaEnumRemoteField) for the fields that are contained by this class and match given characteristics.

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

ParameterDescription
[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 0 (zero) to include all field kinds.
[in] ulModifiers A bitmask of flags indicating the modifiers of fields to be included in the enumeration. Use 0 (zero) to include all field modifiers.
[in] lpcszName The name of the field to be included in the enumeration. Use NULL to include all names.

Remarks

The characteristics are determined by three parameters passed to the method that specify the name of the field, the field modifiers bitmask, and the field kind. A null parameter passed for the name is used to include all names. A bitmask of 0 is used to include all field modifiers. A FIELD_KIND of 0 is used to include all field kinds.

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField object can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

The field modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteClassField::GetFileName

The GetFileName method returns the full name of the class if it is available (C:\classes\HelloWorld.class, for example).

HRESULT GetFileName(LPOLESTR *ppszFileName)

ParameterDescription
[out] ppszFileName Returns the full path of the file that contains this class if it is available; for example, "c:\classes\HelloWorld.class".

IRemoteClassField::GetSourceFileName

The GetSourceFileName method returns the name of the source file attribute (“SourceFile”) from the class file if it is available (HelloWorld.java, for example).

HRESULT GetSourceFileName(LPOLESTR *ppszSourceFileName)

ParameterDescription
[out] ppszSourceFileName Returns the name of the source file used to create this class; for example, "HelloWorld.java".

IRemoteClassField::GetSuperClass

The GetSuperClass method returns the class (an IRemoteClassField) from which this class is derived. For Java.Lang.Object, the top of the hierarchy, this method returns NULL.

HRESULT GetSuperclass(IRemoteClassField **ppSuperclass)

ParameterDescription
[out] ppSuperclass Returns the class from which this class is derived.

IRemoteClassField::GetInterfaces

The GetInterfaces method returns an enumerator (IJavaEnumRemoteField) for the interfaces that this class implements.

HRESULT GetInterfaces(IJavaEnumRemoteField **ppEnum)

Parameter Description
[out] ppEnum Returns an enumerator for the interfaces that this class implements.

Remarks

If the class has no interfaces, an enumerator is returned that enumerates nothing.

IRemoteClassField::GetConstantPoolItem

The GetConstantPoolItem method returns the raw contents for the constant pool and is used for disassembly. Any indices contained within the constant pool item are converted from big endian order to platform byte order.

HRESULT GetConstantPoolItem(ULONG indexCP, BYTE **ppCPBytes, ULONG *plength)

Parameter Description
[in] indexCP Index in the constant pool of this class of the entry to be retrieved.
[out] ppCPBytes Returns the constant pool data of the requested entry.
[out] plength Returns the length of the returned constant pool entry, in bytes.

Remarks

The constant pool items are defined by an initial tag byte that indicates the format of the item stored followed the specific information for that constant entry. The constant pool tag bytes are defined as shown in the following table.

enum Value Description
CP_CONSTANT_UTF8 1 A UCS Transformation Format (UTF-8) string used to represent constant string values encoded in a structure with a two-byte length preceding the string.
CP_CONSTANT_UNICODE 2 A Unicode string with a two-byte length preceding the string.
CP_CONSTANT_INTEGER 3 A 32-bit integer constant.
CP_CONSTANT_FLOAT 4 A 32-bit single-precision floating point constant.
CP_CONSTANT_LONG 5 A 64-bit long constant.
CP_CONSTANT_DOUBLE 6 A 64-bit double precision floating-point constant.
CP_CONSTANT_CLASS 7 A 16-bit index to a UTF-8 constant name.
CP_CONSTANT_STRING 8 A 16-bit index to a UTF-8 constant string.
CP_CONSTANT_FIELDREF 9 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_METHODREF 10 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_
INTERFACEMETHODREF
11 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_NAMETYPE 12 One 16-bit index to a name (UTF-8 constant) followed by a 16-bit index to a field or method descriptor (a UTF-8 constant) representing the type of a class or instance variable. The field or method descriptor is a series of characters defined in the Java Virtual Machine specification published by Sun Microsystems.

IRemoteClassFieldEx : IRemoteClassField

The IRemoteClassFieldEx represents a class definition. This interface inherits from IRemoteClassField adding one new method.

Because all the attributes of a field are constant during its lifetime, the debugger can cache this information until the class is unloaded.

IRemoteClassFieldEx::GetName

The GetName method returns the identifier (the class name) for this field.

HRESULT GetName(LPOLESTR *ppszName)

ParameterDescription
[out] ppszName Returns the identifier for this field; for example, "FooClass".

IRemoteClassFieldEx::GetKind

The GetKind method returns the kind (FIELD_KIND enum) of this field.

HRESULT GetKind(FIELDKIND *pKind)

Parameter Description
[out] pKind Returns the kind of this field, FIELD_KIND_CLASS.

Remarks

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

IRemoteClassFieldEx::GetType

The GetType method returns an IRemoteField object that represents the type of this field.

HRESULT GetType(IRemoteField **ppType)

ParameterDescription
[out] ppType Returns NULL for a Class field.

Remarks

The relationship between a field and its type depends on the FIELD_KIND of the field. The type will be either a class type or a Java native object type (boolean, short, integer, long, and so on). When this method is called on a global container field, the method returns S_OK and the IRemoteField object returned representing the type is NULL.

IRemoteClassFieldEx::GetContainer

The GetContainer method returns an IRemoteContainerField object representing the class that contains the field.

HRESULT GetContainer(IRemoteContainerField **ppContainer)

ParameterDescription
[out] ppContainer Returns the field representing the class that contains the field.

IRemoteClassFieldEx::GetModifiers

The GetModifiers method returns a bitmask of flags containing the modifiers (FIELDMODIFIERS enum) for this field. If a bit is set, the type is modified in that way.

HRESULT GetModifiers(ULONG *pulModifiers)

ParameterDescription
[out] pulModifiers Returns a bitmask of flags containing the modifiers for this type.

Remarks

Fields also have a set of modifiers contained in a flag attribute bitmask. These modifier bits are the same as those used in the access_flags field of the class file header. These bitmasks are defined in Java Virtual Machine specification published by JavaSoft.

These modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteClassFieldEx::GetFields

The GetFields method returns an enumerator (IJavaEnumRemoteField) for the fields that are contained by this class and match given characteristics.

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

ParameterDescription
[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 0 (zero) to include all field kinds.
[in] ulModifiers A bitmask of flags indicating the modifiers of fields to be included in the enumeration. Use 0 (zero) to include all field modifiers.
[in] lpcszName The name of the field to be included in the enumeration. Use NULL to include all names.

Remarks

The characteristics are determined by three parameters passed to the method that specify the name of the field, the field modifiers bitmask, and the field kind. A null parameter passed for the name is used to include all names. A bitmask of 0 is used to include all field modifiers. A FIELD_KIND of 0 is used to include all field kinds.

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField object can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

The field modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteClassFieldEx::GetFileName

The GetFileName method returns the full name of the class if it is available (C:\classes\HelloWorld.class, for example).

HRESULT GetFileName(LPOLESTR *ppszFileName)

ParameterDescription
[out] ppszFileName Returns the full path of the file that contains this class if it is available; for example, "c:\classes\HelloWorld.class".

IRemoteClassFieldEx::GetSourceFileName

The GetSourceFileName method returns the name of the source file attribute (“SourceFile”) from the class file if it is available (HelloWorld.java, for example).

HRESULT GetSourceFileName(LPOLESTR *ppszSourceFileName)

ParameterDescription
[out] ppszSourceFileName Returns the name of the source file used to create this class; for example, "HelloWorld.java".

IRemoteClassFieldEx::GetSourceFileDir

The GetSourceFileDir method returns the name of the source file directory attribute (“SourceDir”) from the class file if it is available.

HRESULT GetSourceFileDir(LPOLESTR *ppszSourceFileName)

ParameterDescription
[out] ppszSourceFileName Returns the name of the source file directory attribute from the class file.

IRemoteClassFieldEx::GetSuperClass

The GetSuperClass method returns the class (an IRemoteClassField) from which this class is derived. For Java.Lang.Object, the top of the hierarchy, this method returns NULL.

HRESULT GetSuperclass(IRemoteClassField **ppSuperclass)

ParameterDescription
[out] ppSuperclass Returns the class from which this class is derived.

IRemoteClassFieldEx::GetInterfaces

The GetInterfaces method returns an enumerator (IJavaEnumRemoteField) for the interfaces that this class implements.

HRESULT GetInterfaces(IJavaEnumRemoteField **ppEnum)

Parameter Description
[out] ppEnum Returns an enumerator for the interfaces that this class implements.

Remarks

If the class has no interfaces, an enumerator is returned that enumerates nothing.

IRemoteClassFieldEx::GetConstantPoolItem

The GetConstantPoolItem method returns the raw contents for the constant pool and is used for disassembly. Any indices contained within the constant pool item are converted from big endian order to platform byte order.

HRESULT GetConstantPoolItem(ULONG indexCP, BYTE **ppCPBytes,
     ULONG *plength)

Parameter Description
[in] indexCP The index in the constant pool of this class of the entry to be retrieved.
[out] ppCPBytes Returns the constant pool data of the requested entry.
[out] plength Returns the length of the returned constant pool entry, in bytes.

Remarks

The constant pool items are defined by an initial tag byte that indicates the format of the item stored followed the specific information for that constant entry. The constant pool tag bytes are defined as shown in the following table.

enum Value Description
CP_CONSTANT_UTF8 1 A UCS Transformation Format (UTF-8) string used to represent constant string values encoded in a structure with a two-byte length preceding the string.
CP_CONSTANT_UNICODE 2 A Unicode string with a two-byte length preceding the string.
CP_CONSTANT_INTEGER 3 A 32-bit integer constant.
CP_CONSTANT_FLOAT 4 A 32-bit single-precision floating point constant.
CP_CONSTANT_LONG 5 A 64-bit long constant.
CP_CONSTANT_DOUBLE 6 A 64-bit double precision floating-point constant.
CP_CONSTANT_CLASS 7 A 16-bit index to a UTF-8 constant name.
CP_CONSTANT_STRING 8 A 16-bit index to a UTF-8 constant string.
CP_CONSTANT_FIELDREF 9 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_METHODREF 10 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_
INTERFACEMETHODREF
11 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_NAMETYPE 12 One 16-bit index to a name (UTF-8 constant) followed by a 16-bit index to a field or method descriptor (a UTF-8 constant) representing the type of a class or instance variable. The field or method descriptor is a series of characters defined in the Java Virtual Machine specification published by Sun Microsystems.

IRemoteInnerClassField : IRemoteClassFieldEx

The IRemoteInnerClassField represents an inner class definition. This interface inherits from IRemoteClassFieldEx adding several new methods.

Because all the attributes of a field are constant during its lifetime, the debugger can cache this information until the class containing the field is unloaded.

IRemoteInnerClassField::GetName

The GetName method returns the identifier (the class name) for this field.

HRESULT GetName(LPOLESTR *ppszName)

ParameterDescription
[out] ppszName Returns the identifier for this field; for example, "FooClass".

IRemoteInnerClassField::GetKind

The GetKind method returns the kind (FIELD_KIND enum) of this field.

HRESULT GetKind(FIELDKIND *pKind)

ParameterDescription
[out] pKind Returns the kind of this field, FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS.

Remarks

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField object can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

IRemoteInnerClassField::GetType

The GetType method returns an IRemoteField object that represents the type of this field.

HRESULT GetType(IRemoteField **ppType)

ParameterDescription
[out] ppType Returns NULL for a Class field.

Remarks

The relationship between a field and its type depends on the FIELD_KIND of the field. The type will be either a class type or a Java native object type (boolean, short, integer, long, and so on). When this method is called on a global container field, the method returns S_OK and the IRemoteField object returned representing the type is NULL.

IRemoteInnerClassField::GetContainer

The GetContainer method returns an IRemoteContainerField object representing the class that contains the field.

HRESULT GetContainer(IRemoteContainerField **ppContainer)

ParameterDescription
[out] ppContainer Returns the field representing the class that contains the field.

IRemoteInnerClassField::GetModifiers

The GetModifiers method returns a bitmask of flags containing the modifiers (FIELDMODIFIERS enum) for this field. If a bit is set, the type is modified in that way.

HRESULT GetModifiers(ULONG *pulModifiers)

ParameterDescription
[out] pulModifiers Returns a bitmask of flags containing the modifiers for this type.

Remarks

Fields also have a set of modifiers contained in a flag attribute bitmask. These modifier bits are the same as those used in the access_flags field of the class file header. These bitmasks are defined in Java Virtual Machine specification published by JavaSoft.

These modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteInnerClassField::GetFields

The GetFields method returns an enumerator (IJavaEnumRemoteField) for the fields that are contained by this class and match given characteristics.

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

ParameterDescription
[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 0 (zero) to include all field kinds.
[in] ulModifiers A bitmask of flags indicating the modifiers of fields to be included in the enumeration. Use 0 (zero) to include all field modifiers.
[in] lpcszName The name of the field to be included in the enumeration. Use NULL to include all names.

Remarks

The characteristics are determined by three parameters passed to the method that specify the name of the field, the field modifiers bitmask, and the field kind. A null parameter passed for the name is used to include all names. A bitmask of 0 is used to include all field modifiers. A FIELD_KIND of 0 is used to include all field kinds.

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField object can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

The field modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteInnerClassField::GetFileName

The GetFileName method returns the full name of the class if it is available (C:\classes\HelloWorld.class, for example).

HRESULT GetFileName(LPOLESTR *ppszFileName)

ParameterDescription
[out] ppszFileName Returns the full path of the file that contains this class if it is available; for example, "c:\classes\HelloWorld.class".

IRemoteInnerClassField::GetSourceFileName

The GetSourceFileName method returns the name of the source file attribute (“SourceFile”) from the class file if it is available (HelloWorld.java, for example).

HRESULT GetSourceFileName(LPOLESTR *ppszSourceFileName)

ParameterDescription
[out] ppszSourceFileName Returns the name of the source file used to create this class; for example, "HelloWorld.java".

IRemoteInnerClassField::GetSourceFileDir

The GetSourceFileDir method returns the name of the source file directory attribute (“SourceDir”) from the class file (if it is available).

HRESULT GetSourceFileDir(LPOLESTR *ppszSourceFileName)

ParameterDescription
[out] ppszSourceFileName Returns the name of the source file directory attribute from the class file.

IRemoteInnerClassField::GetSuperClass

The GetSuperClass method returns the class (an IRemoteClassField) from which this class is derived. For Java.Lang.Object, the top of the hierarchy, this method returns NULL.

HRESULT GetSuperclass(IRemoteClassField **ppSuperclass)

ParameterDescription
[out] ppSuperclass Returns the class from which this class is derived.

IRemoteInnerClassField::GetInterfaces

The GetInterfaces method returns an enumerator (IJavaEnumRemoteField) for the interfaces that this class implements.

HRESULT GetInterfaces(IJavaEnumRemoteField **ppEnum)

Parameter Description
[out] ppEnum Returns an enumerator for the interfaces that this class implements.

Remarks

If the class has no interfaces, an enumerator is returned that enumerates nothing.

IRemoteInnerClassField::GetConstantPoolItem

The GetConstantPoolItem method returns the raw contents for the constant pool and is used for disassembly. Any indices contained within the constant pool item are converted from big endian order to platform byte order.

HRESULT GetConstantPoolItem(ULONG indexCP, BYTE **ppCPBytes,
     ULONG *plength)

Parameter Description
[in] indexCP The index in the constant pool of this class of the entry to be retrieved.
[out] ppCPBytes Returns the constant pool data of the requested entry.
[out] plength Returns the length of the returned constant pool entry, in bytes.

Remarks

The constant pool items are defined by an initial tag byte that indicates the format of the item stored followed the specific information for that constant entry. The constant pool tag bytes are defined as shown in the following table.

enum Value Description
CP_CONSTANT_UTF8 1 A UCS Transformation Format (UTF-8) string used to represent constant string values encoded in a structure with a two-byte length preceding the string.
CP_CONSTANT_UNICODE 2 A Unicode string with a two-byte length preceding the string
CP_CONSTANT_INTEGER 3 A 32-bit integer constant.
CP_CONSTANT_FLOAT 4 A 32-bit single-precision floating point constant.
CP_CONSTANT_LONG 5 A 64-bit long constant.
CP_CONSTANT_DOUBLE 6 A 64-bit double precision floating-point constant.
CP_CONSTANT_CLASS 7 A 16-bit index to a UTF-8 constant name.
CP_CONSTANT_STRING 8 A 16-bit index to a UTF-8 constant string.
CP_CONSTANT_FIELDREF 9 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_METHODREF 10 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_
INTERFACEMETHODREF
11 A 16-bit index to a class followed by a 16-bit index to a name_and_type.
CP_CONSTANT_NAMETYPE 12 One 16-bit index to a name (UTF-8 constant) followed by a 16-bit index to a field or method descriptor (a UTF-8 constant) representing the type of a class or instance variable. The field or method descriptor is a series of characters defined in the Java Virtual Machine specification published by Sun Microsystems.

IRemoteInnerClassField::GetInnerClassName

The GetInnerClassName method returns the actual class name, not the mangled class name from the Java compiler.

HRESULT GetInnerClassName (LPOLESTR *ppszName)

ParameterDescription
[out] ppszName Returns the actual class name.

IRemoteInnerClassField::GetInnerClassModifiers

The GetInnerClassModifiers method returns the real field modifiers for the inner class.

HRESULT GetInnerClassModifiers (FIELDMODIFIERS *pulModifiers)

ParameterDescription
[out] pulModifiers Returns the actual modifiers for an inner class.

IRemoteInnerClassField::GetOuterClass

The GetOuterClass method returns an IRemoteClassField representing the outer class.

HRESULT GetOuterClass(IRemoteClassField **ppOuterClass)

ParameterDescription
[out] ppOuterClass Returns the outer class for this inner class.

IRemoteMethodField : IRemoteContainerField

The IRemoteMethodField represents a method within a class. This interface inherits from IRemoteContainerField. In addition to the methods supported by IRemoteContainerField,

This interface implements a number of methods that can be used by a debugger to set and clear breakpoints, get line number info, return Java bytecodes, and other information.

Because all the attributes of a field are constant during its lifetime, the debugger can cache this information.

IRemoteMethodField::GetName

The GetName method returns the identifier (the method name) for this field.

HRESULT GetName(LPOLESTR *ppszName)

ParameterDescription
[out] ppszName Returns the identifier for this field; for example, "SortMethod".

IRemoteMethodField::GetKind

The GetKind method returns the kind (FIELD_KIND enum) of this field.

HRESULT GetKind(FIELDKIND *pKind)

ParameterDescription
[out] pKind Returns the kind of this field, FIELD_KIND_METHOD.

Remarks

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField object can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

IRemoteMethodField::GetType

The GetType method returns an IRemoteField object that represents the return type of this method.

HRESULT GetType(IRemoteField **ppType)

ParameterDescription
[out] ppType Returns an IRemoteField from which the return type of this method can be determined.

Remarks

The relationship between a field and its type depends on the FIELD_KIND of the field. The type will be either a class type or a Java native object type (boolean, short, integer, long, and so on).

IRemoteMethod::GetContainer

The GetContainer method returns an IRemoteContainerField object representing the class that contains this method.

HRESULT GetContainer(IRemoteContainerField **ppContainer)

ParameterDescription
[out] ppContainer Returns the field representing the class that contains this method.

IRemoteMethod::GetModifiers

The GetModifiers method returns a bitmask of flags containing the modifiers (FIELDMODIFIERS enum) for this field. If a bit is set, the type is modified in that way.

HRESULT GetModifiers(ULONG *pulModifiers)

ParameterDescription
[out] pulModifiers Returns a bitmask of flags containing the modifiers for this type.

Remarks

Fields also have a set of modifiers contained in a flag attribute bitmask. These modifier bits are the same as those used in the access_flags field of the class file header. These bitmasks are defined in Java Virtual Machine specification published by JavaSoft.

These modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteMethodField::GetFields

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

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

ParameterDescription
[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 0 (zero) to include all field kinds.
[in] ulModifiers A bitmask of flags indicating the modifiers of fields to be included in the enumeration. Use 0 (zero) to include all field modifiers.
[in] lpcszName The name of the field to be included in the enumeration. Use NULL to include all names.

Remarks

The characteristics are determined by three parameters passed to the method that specify the name of the field, the field modifiers bitmask, and the field kind. A null parameter passed for the name is used to include all names. A bitmask of 0 is used to include all field modifiers. A FIELD_KIND of 0 is used to include all field kinds.

Fields are classified and defined by the FIELDKIND enum as shown in the following table.

FIELDKIND enum Value Description
FIELD_KIND_DATA_OBJECT 0x0001 A class instance.
FIELD_KIND_DATA_PRIMITIVE 0x0002 A primitive Java data type.
FIELD_KIND_ARRAY 0x0004 An array.
FIELD_KIND_CLASS 0x0008 A Java class.
FIELD_KIND_METHOD 0x0010 A Java class method.
FIELD_KIND_LOCAL 0x1000 A local variable in a Java method.
FIELD_KIND_PARAM 0x2000 A parameter passed to a Java method.
FIELD_KIND_THIS 0x4000 A THIS pointer to an object.
FIELD_KIND_INNER_CLASS 0x8000 A Java inner class.

The field kind for an IRemoteField object can be a class (FIELD_KIND_CLASS), a method (FIELD_KIND_METHOD), or a field representing data. For fields representing data objects, the field kind returned will be a bitmask combined from the following two groups.

FIELD_KIND_DATA_OBJECT, FIELD_KIND_DATA_PRIMITIVE, or FIELD_KIND_ARRAY

FIELD_KIND_LOCAL, FIELD_KIND_PARAM, or FIELD_KIND_THIS

For example, an array passed as a parameter to a method would have a field kind consisting of FIELD_KIND_ARRAY combined (ORed) with FIELD_KIND_PARAM.

For an inner class, the field kind consists of FIELD_KIND_CLASS combined with FIELD_KIND_INNER_CLASS. For a class field, the container field is FIELD_KIND_CLASS.

The field modifier bits are defined by the FIELDMODIFIERS enum as shown in the following table.

FIELDMODIFIERS enum Value Description
FIELD_ACC_PUBLIC 0x0001 Is public and may be accessed from outside its package (visible to everyone). This modifier can be applied to any class, interface, field, or method.
FIELD_ACC_PRIVATE 0x0002 Is private and usable only within the defining class. This modifier can be applied to a class, method, or class field.
FIELD_ACC_PROTECTED 0x0004 Is protected and may be accessed within this class and subclasses. This modifier can be applied to any class, method, or class field.
FIELD_ACC_STATIC 0x0008 A static field or method. This modifier can be applied to any class, method, or field.
FIELD_ACC_FINAL 0x0010 Is final and no further subclassing or assignment is allowed. This modifier can be applied to any class, method, or field.
FIELD_ACC_SYNCHRONIZED 0x0020 Use monitor lock when the method is invoked. This modifier can be applied to any class or method.
FIELD_ACC_VOLATILE 0x0040 The value of this field cannot be cached. This modifier can be applied to any class field.
FIELD_ACC_TRANSIENT 0x0080 This field cannot be read or written by a persistent object manager. This modifier can be applied to any class field.
FIELD_ACC_NATIVE 0x0100 This method is implemented using native code. This modifier can be applied to any class or method.
FIELD_ACC_INTERFACE 0x0200 Is an interface (used to distinguish between an interface and a class). This modifier is applied to an interface.
FIELD_ACC_ABSTRACT 0x0400 An abstract class or interface that may not be instantiated. This modifier can be applied to a class, an interface, or a method.
FIELD_ACC_SUPER 0x0800 Treat superclass methods specially in invokespecial (used for backward compatibility). This modifier can be applied to any class or interface.
FIELD_ACC_SYNTHETIC 0x1000 Set on fields that the compiler had to generate (used by inner classes).

IRemoteMethodField::SetBreakpoint

The SetBreakpoint method sets a code breakpoint at a given byte offset from the start of a method.

HRESULT SetBreakpoint(ULONG offPC)

Parameter Description
[in] offPC A byte offset within this method.

Remarks

The Microsoft VM will not validate the given location of the breakpoint; a breakpoint may be set at any offset within the method’s bytecodes. Breakpoints are reference counted and may be set multiple times at the same byte offset.

IRemoteMethodField::ClearBreakpoint

The ClearBreakpoint method clears a code breakpoint at a given byte offset from the start of a method. This method will only clear breakpoints set by SetBreakpoint.

HRESULT ClearBreakpoint(ULONG offPC)

Parameter Description
[in] offPC Byte offset within this method.

Remarks

If a breakpoint is set multiple times, it must be cleared the same number of times to eliminate it completely.

IRemoteMethodField::GetLineInfo

The GetLineInfo method returns an enumerator of LINEINFO structures (IJavaEnumLINEINFO objects) describing the mapping between source lines and byte offset within the Java bytecodes representing the method. This mapping is in order of increasing offsets. The last element in the list is a “dummy” node with a line number field set to the last line of the method + 1 and the offset field set to the last offset in the method +1.

HRESULT GetLineInfo(IEnumLINEINFO **ppEnum)

Parameter Description
[out] ppEnum Returns an enumerator of LINEINFO structures describing the mapping between source lines and byte offset within this method. This mapping is in order of increasing offsets. The last element in the list is a dummy node with the line number field set to (the last line of the method + 1) and the offset field set to (the last offset in the method + 1).

IRemoteMethodField::GetBytes

The GetBytes method returns an interface (ILockBytes) that can be used to access the Java bytecode of the method. This method can be used by a debugger to display a disassembly of the bytecode.

HRESULT GetBytes(ILockBytes **ppLockBytes)

Parameter Description
[out] ppLockBytes Returns an ILockBytes interface that you can use to access this method's bytecode.

IRemoteMethodField::GetScope

The GetScope method returns the range of byte offsets (within which the object is in scope) that can be used by a debugger to obtain the value of some field within this method.

HRESULT GetScope(IRemoteField *pField, ULONG *poffStart,
     ULONG *pcbScope)

Parameter Description
[in] pField The field whose scope within this method is to be determined.
[out] poffStart The byte offset within this method where the scope of the given field begins.
[out] pcbScope Length of the scope of the given field in this method, in bytes.

IRemoteMethodField::GetIndexedField

The GetIndexedField method returns a local variable or parameters field from a method by local variable index and byte offset.

HRESULT GetIndexedField(ULONG slot, ULONG offPC,  IRemoteField **ppField)

Parameter Description
[in] slot The slot in this method of the field to be retrieved.
[in] offPC The byte offset within this method indicating the given slot's execution context.
[out] ppField The field contained by the given slot at the given byte offset.

IEnumRemoteField : IUnknown

The IEnumRemoteField interface is used to enumerate all the fields contained within a class, method, or container.

IEnumRemoteField::Next

The Next method is used to retrieve an array of IRemoteField objects that represent the fields within a class, method, or container. The number of fields to be retrieved is passed as one of the parameters; the enumeration pointer is incremented by that amount.

HRESULT Next(ULONG celt, IRemoteField *rgelt[], ULONG *pceltFetched)

ParameterDescription
[in] celt The number of IRemoteField objects requested to be retrieved.
[out] drgelt The pointer to the array of IRemoteField objects that is retrieved.
[out] pceltFetched The number of actual IRemoteField objects that was retrieved.

IEnumRemoteField::Skip

The Skip method moves the position of the enumeration forward. The number of objects to be skipped is based on a parameter passed to the method.

HRESULT Skip(ULONG celt)

ParameterDescription
[in] celt The number of IRemoteField objects requested to be skipped.

IEnumRemoteField::Reset

The Reset method sets or resets the positions of the enumerator to the beginning of the list of fields.

HRESULT Reset(void)

IEnumRemoteField::Clone

The Clone method copies a pointer to the current position in the list to another enumerator object.

HRESULT Clone(IJavaEnumRemoteField **ppEnum)

ParameterDescription
[out] ppEnum Returns an enumerator object pointing to the fields in a class, method, or container representing the current position in the list of fields.

IEnumRemoteField::GetCount

The GetCount method returns the number of fields being pointed to by the enumerator object.

HRESULT GetCount (ULONG * pcelt)

ParameterDescription
[out] pcelt The number of fields pointed to by the enumerator object.

IJavaEnumRemoteField : IEnumRemoteField

The IJavaEnumRemoteField interface is used to enumerate all the fields contained within a class, method, or container. The IJavaEnumRemoteField object inherits from IEnumRemoteField, extending this interface with one additional method.

IJavaEnumRemoteField::Next

The Next method is used to retrieve an array of IRemoteField objects that represent the fields within a class, method, or container. The number of fields to be retrieved is passed as one of the parameters; the enumeration pointer is incremented by that amount.

HRESULT Next(ULONG celt, IRemoteField *rgelt[], ULONG *pceltFetched)

ParameterDescription
[in] celt The number of IRemoteField objects requested to be retrieved.
[out] drgelt The pointer to the array of IRemoteField objects that is retrieved.
[out] pceltFetched The number of actual IRemoteField objects that was retrieved.

IJavaEnumRemoteField::Skip

The Skip method moves the position of the enumeration forward. The number of objects to be skipped is based on a parameter passed to the method.

HRESULT Skip(ULONG celt)

Parameter Description
[in] celt The number of IRemoteField objects requested to be skipped.

IJavaEnumRemoteField::Reset

The Reset method sets or resets the positions of the enumerator to the beginning of the list of fields.

HRESULT Reset(void)

IJavaEnumRemoteField::Clone

The Clone method copies a pointer to the current position in the list to another enumerator object.

HRESULT Clone(IJavaEnumRemoteField **ppEnum)

ParameterDescription
[out] ppEnum Returns an enumerator object pointing to the fields in a class, method, or container representing the current position in the list of fields.

IJavaEnumRemoteField::GetCount

The GetCount method returns the number of fields being pointed to by the enumerator object.

HRESULT GetCount (ULONG * pcelt)

ParameterDescription
[out] pcelt The number of fields pointed to by the enumerator object.

IJavaEnumRemoteField::GetNext

The GetNext method is used to retrieve the next IRemoteField object being pointed to by the enumerator object and increments the enumeration pointer by one.

HRESULT GetNext(IRemoteField **ppirf)

ParameterDescription
[out] ppirf The pointer to the IRemoteField object that is retrieved.

IEnumLINEINFO : IUnknown

Line number information represents the mapping between Java source code line numbers and byte offsets in the method. This information is represented as an array of LINEINFO structures maintained for each method. The IEnumLINEINFO interface provides access to this information.

IEnumLINEINFO::Next

The Next method is used to retrieve an array of LINEINFO structures that represent the mapping between Java source code line numbers and byte offsets in the method. The number of LINEINFO structures to be retrieved is passed as one of the parameters; the enumeration pointer is incremented by that amount.

HRESULT Next(ULONG celt, LPLINEINFO *rgelt[], ULONG *pceltFetched)

ParameterDescription
[in] celt The number of LINEINFO structures requested to be retrieved.
[out] drgelt The pointer to the array of LINEINFO structures that are retrieved.
[out] pceltFetched The number of actual LINEINFO structures that was retrieved.

Remarks

The LINEINFO structure is defined as follows:

typedef struct lineinfo {
   USHORT iLine;      // line number
   USHORT offPC;      // byte offset in method
} LINEINFO;

IEnumLINEINFO::Skip

The Skip method moves the position of the enumeration forward. The number of LINEINFO structures to be skipped is based on a parameter passed to the method.

HRESULT Skip(ULONG celt)

ParameterDescription
[in] celt The number of LINEINFO structures requested to be skipped.

IEnumLINEINFO::Reset

The Reset method sets or resets the positions of the enumerator to the beginning of the list of LINEINFO structures.

HRESULT Reset(void)

IEnumLINEINFO::Clone

The Clone method copies a pointer to the current position in the list to another enumerator object.

HRESULT Clone(IJavaEnumLINEINFO **ppEnum)

ParameterDescription
[out] ppEnum Returns an enumerator object representing the current position in the list of LINEINFO structures.

IEnumLINEINFO::GetCount

The GetCount method returns the number of LINEINFO structures being pointed to by the enumerator object.

HRESULT GetCount (ULONG * pcelt)

ParameterDescription
[out] pcelt The number of LINEINFO structures pointed to by the enumerator object.

IJavaEnumLINEINFO : IEnumLINEINFO

Line number information represents the mapping between Java source code line numbers and byte offsets in the method. This information is represented as an array of LINEINFO structures maintained for each method. The IJavaEnumLINEINFO interface provides access to this information. This interface inherits from the IEnumLINEINFO interface add one new method.

IJavaEnumLINEINFO::Next

The Next method is used to retrieve an array of LINEINFO structures that represent the mapping between Java source code line numbers and byte offsets in the method. The number of LINEINFO structures to be retrieved is passed as one of the parameters; the enumeration pointer is incremented by that amount.

HRESULT Next(ULONG celt, LPLINEINFO rgelt[], ULONG *pceltFetched)

ParameterDescription
[in] celt The number of LINEINFO structures requested to be retrieved.
[out] drgelt The pointer to the array of LINEINFO structures that are retrieved.
[out] pceltFetched The number of actual LINEINFO structures that was retrieved.

Remarks

The LINEINFO structure is defined as follows:

typedef struct lineinfo {
   USHORT iLine;      // line number
   USHORT offPC;      // byte offset in method
} LINEINFO;

IJavaEnumLINEINFO::Skip

The Skip method moves the position of the enumeration forward. The number of LINEINFO structures to be skipped is based on a parameter passed to the method.

HRESULT Skip(ULONG celt)

ParameterDescription
[in] celt The number of LINEINFO structures to be skipped.

IJavaEnumLINEINFO::Reset

The Reset method sets or resets the positions of the enumerator to the beginning of the list of LINEINFO structures.

HRESULT Reset(void)

IJavaEnumLINEINFO::Clone

The Clone method copies a pointer to the current position in the list to another enumerator object.

HRESULT Clone(IJavaEnumLINEINFO **ppEnum)

ParameterDescription
[out] ppEnum Returns an enumerator object representing the current position in the list of LINEINFO structures.

IJavaEnumLINEINFO::GetCount

The GetCount method returns the number of LINEINFO structures being pointed to by the enumerator object.

HRESULT GetCount (ULONG * pcelt)

ParameterDescription
[out] pcelt The number of LINEINFO structures pointed to by the enumerator object.

IJavaEnumLINEINFO::GetNext

The GetNext method is used to retrieve the next LINEINFO structure being pointed to by the enumerator object and increments the enumeration pointer by one.

HRESULT GetNext(LPLINEINFO *pli)

ParameterDescription
[out] pli The pointer to the LINEINFO structure that is retrieved.

Remarks

The LINEINFO structure is defined as follows:

typedef struct lineinfo {
   USHORT iLine;      // line number
   USHORT offPC;      // byte offset in method
} LINEINFO;

Top © 1998 Microsoft Corporation. All rights reserved. Terms of use.