Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Instrumentation is applied to methods of abstract and concrete classes that satisfy the following criteria:•    The

  • The matched class implements, directly or indirectly, the interface that is specified in the <class-name> element.

...

  • The name of the method matches the name that is specified in the <name> element.

...

  • The method was declared in the matching interface.

Based on these rules, custom-type instrumentation is applied to the following methods:•    AbstractTask

  • AbstractTask.start()

...

  • AbstractTask.stop(boolean)

...

  • RecoverableTaskAdapter.start()

...

  • RecoverableTaskAdapter.stop(boolean)

However, instrumentation is not applied to the following methods:•    AbstractTask

  • AbstractTask.start(TaskContext) because the method was not declared in the Task interface.

...

  • AbstractTask.stop() because the method does not match the specified signature of (boolean).

...

  • RecoverableTaskAdapter.start(TaskContext) because the method was not declared in the Taskinterface.

...

  • RecoverableTaskAdapter.recover(RecoverableTaskContext) because the method was not declared in the Task interface.

...

About extending instrumentation to interfaces matching a wildcard

...

However, wildcards can be used to apply instrumentation to all abstract or concrete classes whose names match the wildcard pattern that is specified in the <class-name> element.

See “About About using the wildcard character *” on page 219.

About extending instrumentation to methods that match a wildcard

...

This instrumenter configuration file causes instrumentation to be applied to the start() and stop() methods of abstract and concrete classes that extend the AbstractTask class. See “About About using the wildcard character *” on page 219.

<?xml version='1.0'?>

<instrumenter-config>

...

Wildcards are permitted in the class or interface name and method name. See “About About using the wildcard character *” on page 219.

Use the <invocation-relationship> element to prevent instrumentation from being applied to specifically matched calls to methods from a specifically matched calling method. The <invocation-relationship> element has the following structure:

...

<invoked-method> com.acme.shared.comm.Connector.&lt;init&gt; (java.lang.String,int[][]) </invoked-method>

Anchor
AboutUsingWildcardCharacter
AboutUsingWildcardCharacter
About using the wildcard character *

In addition to using specific names to reference items such as classes, interfaces, and methods, for instrumentation, you can also use the wildcard character * to instruct Precise for J2EE to instrument all classes, methods, or packages within the scope of the instruction.

...