Skip to main content

Join point

Simple Story

A join point is a moment during the examination where the teacher could step in: this method is about to be called, this constructor is about to run.

It is a candidate moment, not a chosen one. Choosing which of them you care about is a separate step.

What it is

A join point is a well-defined point in program execution: a method call, a method execution, a constructor call, a field access. The set of join points a system can express is its join point model, and it differs between implementations.

The distinction that matters most in Ares is call versus execution:

  • a call join point is at the caller, where the call is written;
  • an execution join point is at the callee, inside the method being run.

This is not a detail. AspectJ weaves at call sites, which means it can only intercept calls it can see and rewrite. A call made from inside the Java Development Kit (JDK), or reached reflectively, has no woven call site. See AspectJ versus Instrumentation for what follows from that.

Further reading