This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes What is AspectJ,Interceptor? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "What is AspectJ,Interceptor?" Watch "What is AspectJ,Interceptor?" New topic
Author

What is AspectJ,Interceptor?

maliny ramu
Greenhorn

Joined: May 14, 2007
Posts: 10
hi guys,
I need some general explaination on the AspectJ,Interceptor? As a beginner, i dont really understand or getting the idea of it. Could someone guide me on this with a simple understanding and example?

Thanks in advance.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10067
    
163

AspectJ is a Aspect Oriented Programming tool. You can write interceptors around your methods. To put it in a simpler terms, consider the following method in your class:



Now lets assume you want some code to be executed before/after this doSomeOp() is called. Aspect Oriented Programming allows you to do this.
Here's one more article about this:
AspectJ example
[ June 04, 2007: Message edited by: Jaikiran Pai ]

[My Blog] [JavaRanch Journal]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

"maliny"

Please click on the My Profile link above and change your display name to meet the JavaRanch Naming Policy of using your real first and real last names.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
 
subject: What is AspectJ,Interceptor?