Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

AOP and AspectJ Terminology

DZone's Guide to

AOP and AspectJ Terminology

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

In my recent blog on 10 minute concepts, I mentioned some of the terms relating to AspectJ and AOP, which I never defined. This blog puts that right and explains some of these terms below...

AspectJ Term Description
Aspect A feature of a program that is separate from, and not related to any specific part of a program, but is woven throughout the fabric of the program so as to be used by all or many parts of the program.... and this sounds really vague. You can think of a program as a bunch of events, for example: methods being called, objects being constructed etc. An aspect oriented approach to programming, such as ApsectJ, really means creating some mechanism where by you can call your method before, after or around some other event, so as run some of your code, without the need to reference this code from the event.
Join Point A join point is the name given to one of the programmatic events as described above, eg calling a method or creating an object. In AspectJ, a joint point is really the specification of where/when in your program, your aspect code is running. For example, if your aspect code runs before a given method call, then the join point describes the signature and arguments of that method.
Pointcut A set of related joint points. When program execution reaches one of the join points in the pointcut, then your aspect code will run.
Advice This is the code that runs when program execution reaches a joint point in your pointcut.

 

From http://www.captaindebug.com/2011/09/aop-and-aspectj-terminology.html

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}