DELAPARRA
Index
Color
NL
Category: Programming paradigms

Pointcut

Explained by Updated

What is Pointcut?

Pointcut: An expression that selects which join points an aspect applies to, e.g. "every method in the service package". A pointcut is an expression in aspect-oriented programming that selects where an aspect applies. "Every public method in the billing services" or "every method marked with a @Transactional annotation" are pointcuts. It is paired with advice, the code that runs at those points. Together they let you add behaviour like logging or transactions to many places without editing each one.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Pointcut

What should you keep in mind with Pointcut?

The precision of a pointcut matters. Too broad, and the aspect runs in places nobody expected, slowing things down or causing odd side effects. Too narrow, and new code silently misses the behaviour. Annotation-based pointcuts are usually the clearest, because the marker is visible on the method itself. In frameworks without AOP, route groups for middleware play a similar selecting role.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with P

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.