A fragment's data items are the names and types of data items that the fragment's source code can reference.
The specification of data items is optional. A fragment can contain more than one data item, but each type of item can appear only once.
Property | Description |
---|---|
Data Type | Required. The available types are listed in the following table. |
Name | Required. Must specify a valid Java variable name. The probe fragment source code will use this name to refer to the indicated data. |
Data Type | type | Description |
---|---|---|
className | String | For method probes, the class name of the probed method, including the package name, in internal format; for callsite probes, the class name of the called method. Example: org/eclipse/tptp/SomeClass |
methodName | String | For method probes, the method name of the probed method, in internal format; for callsite probes, the method name of the called method. Constructors have the method name <init>, and static class initializers have the method name <clinit>. |
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 is 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 that are primitive types are boxed into temporary objects of the appropriate reference type, for example: Integer for int. If the method takes no arguments, the size of the Object[] array is 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 in exit and afterCall 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 exits by exception, returnedObject is null. |
exceptionObject | Throwable | A reference to the exception object being thrown. This type is available only to catch and exit fragments. If the method exits 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 valid only if the probe declares a staticField. (See A staticField and staticInitializer probe example.) 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 is 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 does 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, and a method run that 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 does not include executable units that were inserted into the class by Probekit. For an explanation of the encoding, see The methodLineTables data 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 valid only for executableUnit and catch probe fragments. If the method does not have source line information, it appears to have a single executable unit, numbered zero. |
To enter probe fragment data items, select Fragment in the tree pane, then use Add and Edit to enter and define the data items in the editing pane.