bg_image
header

Join Point

A Join Point is a concept from Aspect-Oriented Programming (AOP).

Definition:

A Join Point is a specific point during the execution of program code where additional behavior (called an aspect) can be inserted.

Typical examples of Join Points:

  • Method calls

  • Method executions

  • Field access (read/write)

  • Exception handling

Context:

In AOP, cross-cutting concerns (like logging, security, or transaction management) are separated from the main business logic. These concerns are applied at defined points in the program flow — the Join Points.

Related terms:

  • Pointcut: A way to specify which Join Points should be affected (e.g., "all methods starting with save").

  • Advice: The actual code that runs at a Join Point (e.g., "log this method call").

  • Aspect: A combination of Pointcut(s) and Advice(s) — the full module that implements a cross-cutting concern.

Example (in Spring AOP):

@Before("execution(* com.example.service.*.*(..))")
public void logBeforeMethod(JoinPoint joinPoint) {
    System.out.println("Calling method: " + joinPoint.getSignature().getName());
}

→ This logs a message before every method call in a specific package. The joinPoint.getSignature() call provides details about the actual Join Point.


Random Tech

HHVM - HipHop Virtual Machine


HHVM_logo.svg.png