Static information on the classes used in a Java process is available through the IRemoteField hierarchy of interfaces. Because many attributes of a class are constant while the class is loaded, this information can be cached by the debugger across execution of the process being debugged. See the Static Information Debugger Interfaces reference for details.
Global classes (classes not defined within other classes) can be thought of as fields of a global class. Access to static information in a Java process is based on using the IRemoteClassField passed on each ClassLoadEvent notification to the debugger. The GetGlobalContainerObject method (one of the interfaces used for retrieving dynamic information) can also be used indirectly to access the root of this object hierarchy and descend it to retrieve IRemoteClassField objects.
The IRemoteContainerField interface includes a GetFields method that returns an enumerator (IJavaEnumRemoteField) for the fields contained by this container. By calling GetFields, a debugger can obtain an enumerator for the fields in a class, or for the local variables in a method, for example.
Line number information entries describe the mapping between Java source code line numbers and bytecode offsets in a compiled method. This information is represented as a list of LINEINFO structures maintained for each method, when available. The IJavaEnumLINEINFO interface provides access to this information.
The LINEINFO structure is defined as follows:
typedef struct lineinfo { USHORT offPC; // The bytecode offset in a method. USHORT iLine; // The line number, the first line is line 1. } LINEINFO;