Skip to content

Instrument all methods of a class #3

@dblevins

Description

@dblevins

Summary

When -Dmethod is omitted from the instrument goal, instrument all methods of matching classes.

Motivation

When debugging a class you don't understand, you want to see everything it does — every method call, every return value. Requiring a specific method name forces you to know the API before you can debug it.

Design

  • -Dmethod becomes optional on jackknife:instrument
  • When omitted, the instrument config signals "all methods"
  • HandlerEnhancer wraps all non-constructor, non-static-initializer methods
  • Combines with wildcard -Dclass for broad instrumentation

Examples

mvn jackknife:instrument -Dclass=org.junit.Assert
mvn jackknife:instrument -Dclass="org.junit.**"
mvn jackknife:instrument -Dclass=com.example.MyService

Acceptance Criteria

  • Omitting -Dmethod instruments all methods
  • Constructors and static initializers are excluded
  • Works with wildcard -Dclass
  • Integration test in single-instrument-granularity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions