The Data probe object

Data probe objects contain the names and types of data items that are referenced by the source code in a fragment's Code object.

The Data object is optional. A probe fragment can contain more than one Data object, but no two Data objects in a fragment can have the same type or name.

The Data object includes the following properties:

Property Description
name Required. Must specify a valid Java variable name.
type Required. The available types are listed in the following table.

The following table lists and describes the types, and indicates the data type for each type:

Type Data type Description
className String

The class name of the probed method, including the package name, in internal format.

Example: org/eclipse/hyades/SomeClass

methodName String

The method name of the probed method, in internal format. Not valid for staticInitializer fragments.

Constructors have the method name <init>, static class initializers have <clinit> as the method name.

methodSig String

The method argument and return type signature, in internal format. Not valid for staticInitializer fragments.

Example: (Ljava/lang/String;)I

thisObject Object

The this object (for instance methods) that was passed to the probed method. Not valid for staticInitializer fragments.

thisObject will be null for static methods, for entry fragments that are applied to constructors, and for exit fragments applied to constructors when the constructor throws an exception.

args Object[] An array of Object references representing the arguments to the probed method. There is one element in this array for each argument to the method (not counting the this argument). Arguments which are primitive types are bound into temporary objects of the appropriate reference type, for example: Integer for int. If the method takes no arguments, this will be an Object[] array of size zero. Note that constructors for non-static inner classes have one hidden argument per "inner" level, so the argument array will contain more elements than appear in the source code. Not valid for staticInitializer fragments.
returnedObject Object A reference to the object being returned. This type is available only to exit fragments. If the return type of the probed method is a primitive type, the returned value is bound into a temporary object of the appropriate reference type. If the method is void (does not return a value) or it is exiting by exception, returnedObject will be null. Valid only in afterCall fragments.
exceptionObject Throwable A reference to the exception object being thrown. This type is available only to catch and exit fragments. If the method is exiting normally, exceptionObject will be null.
isFinally boolean A flag indicating whether the fragment was called from a finally clause (true), or from a catch clause (false). Valid only in catch fragments.
staticField (varies) The object referred to by the static field. Its type is the same type that was declared in the staticField object. This is only valid if the probe also has the staticField object. Not valid for callsite probes.
classSourceFile String The source file name information available from the debug attributes of the class file. If there is no source information, classSourceFile will be null. For Java the value is typically just the file name, without path information. Not valid for callsite probes.
methodNames String

An encoded list of method names and signatures. The order of the methods in this list is the same as the order of the methods in methodLineTables, and is the same as the ordering reflected by the methodNumber data item. The list will not include the names of any methods that were inserted into the class by Probekit.

The methodNames string consists of one or more method names and signatures, separated by a plus ("+") sign. The method signatures are in Java internal format. For example; a class with two methods, a default constructor a method run which takes a String and returns an int, has this methodNames string: <init>()V+run(Ljava/lang/String;)I

Not valid for callsite probes.

methodLineTables String An encoded list of line numbers that correspond with every executable unit of code in the class. The list will not include executable units that were inserted into the class by Probekit. For an explanation of the encoding, see The methodLineTables string format. Not valid for callsite probes.
methodNumber Integer The index number in the methodNames table for the method into which the probe fragment was inserted. Not valid for callsite probes or staticInitializer fragments.
executableUnitNumber Integer The number of the executable unit that the probe fragment was inserted into. This data type is only valid for executableUnit and catch probe fragments. If the method does not have source line information, it will appear to have a single executable unit, numbered zero.

Example

<data
   type="className"   
   name="__class" />

Contained by
The Fragment probe object

 

Parent topic

Probekit Reference