O'Reilly logo

Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools by Matthew Webster, George Harley, Andy Clement, Adrian Colyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Take My Advice

This chapter explains in detail the use of advice in AspectJ. We examine the basic forms of advice that are supported, and the association between advice and a pointcut expression. We then cover the rules for writing logic within the body of an advice declaration, and tackle the issue of what happens when multiple pieces of advice all need to execute at the same join point. The declare soft mechanism for softening checked exceptions is also covered in this chapter, because it is best used in conjunction with advice implementing an exception-handling strategy. The chapter closes with a look at AspectJ’s declare error/declare warning mechanism, which like advice uses pointcuts to determine join points of interest, only ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required