Aspect-oriented programming: Difference between revisions

Content deleted Content added
cleaning up COI / citespam / sock edit
m Syntax highlighting broken in AspectJ section
Line 128:
 
| Advice specifies to run at (before, after, or around) a join point (specified with a pointcut) certain code (specified like code in a method). The AOP runtime invokes Advice automatically when the pointcut matches the join point. For example:
<syntaxhighlight lang="aspectj">
 
after() : set() {
Display.update();
}
</syntaxhighlight>
 
This effectively specifies: "if the ''<code>set()</code>'' pointcut matches the join point, run the code <code>Display.update()</code> after the join point completes."}}