com.sun.btrace.annotations
Annotation Type OnMethod


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface OnMethod

This annotation specifies a BTrace probe point by specifying a java class (or classes), a method (or methods in it) and a specific location within it. A BTrace trace action method annotated by this annotation is called when matching the traced program reaches the specified location.

Author:
A. Sundararajan

Required Element Summary
 java.lang.String clazz
          The probed (or traced) class name.
 
Optional Element Summary
 boolean follow
           
 Location location
          Identifies exact "location" or "point" of interest to probe within the set of methods.
 java.lang.String method
          The probed (or traced) method name.
 java.lang.String type
          This is method type declaration.
 

Element Detail

clazz

public abstract java.lang.String clazz
The probed (or traced) class name. This is either fully qualified name of the class or regular expression within two forward slash characters [like /java\\.awt\\..+/] or @annotation_of_the_class. i.e., specify a class indirectly as a class annotated by specified annotation.

method

public abstract java.lang.String method
The probed (or traced) method name. This is either the name of the method or regular expression within two forward slash characters [like /read.+/] or @annotation_of_the_method. i.e., specify a method indirectly as a method annotated by specified annotation.

Default:
""

type

public abstract java.lang.String type
This is method type declaration. This is like Java method declaration but not including method name, parameter names and throws clause. *

Eg. public void myMethod(java.lang.String param) will become void (java.lang.String)

Default:
""

location

public abstract Location location
Identifies exact "location" or "point" of interest to probe within the set of methods.

Default:
@com.sun.btrace.annotations.Location

follow

public abstract boolean follow
Default:
false