rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9780321245878

Eclipse AspectJ Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools

by ; ; ;
  • ISBN13:

    9780321245878

  • ISBN10:

    0321245873

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2004-12-14
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
List Price: $59.99

Summary

The definitive (and only) introduction to Aspect-Oriented Programming (AOP) using Eclipse and ASpectJ.

Author Biography

Adrian Colyer is a Senior Technical Staff Member at IBM, the leader of the AspectJ Eclipse project, and co-founder of the AspectJ Development Tools (AJDT) for Eclipse project.

Table of Contents

Preface xv
Introduction xvii
Part 1 Introducing Eclipse, AspectJ, and AJDT
1(130)
Getting Started
3(18)
What Is Eclipse?
3(1)
Installing Eclipse
3(2)
Eclipse Basics
5(6)
Installing AJDT
11(8)
Examples for This Book
19(1)
Summary
20(1)
First Steps in AJDT
21(44)
A Simple Insurance Application
21(5)
Tracking Policy Updates
26(3)
Creating an AspectJ Project
29(5)
Creating the PolicyChangeNotification Aspect
34(3)
Stating the Notification Policy
37(8)
Implementing the Notification Policy
45(5)
Showing Advice In AJDT
50(4)
Evaluating the Implementation
54(7)
Finishing Touches
61(1)
Summary
62(3)
Extending the Application
65(46)
The Story So Far
66(2)
Serialization-Based Persistence
68(16)
Hibernating
84(24)
Managing Build Configurations
108(2)
Summary
110(1)
More AJDT
111(20)
Building an ASPECTJ Project
111(5)
Debugging
116(7)
Editor Templates and the Outline View Toolbar
123(2)
Generating Documentation (Ajdoc)
125(2)
AspectJ Help, Examples, and Cheat Sheets
127(2)
Summary
129(2)
Part 2 The AspectJ Language
131(224)
An Overview of AspectJ
133(14)
What Is An Aspect?
133(3)
Join Points and Pointcuts
136(4)
Advice
140(2)
Inter-Type Declarations
142(2)
Key Design Properties of the AspectJ Language
144(2)
Summary
146(1)
References
146(1)
Straight to the Point
147(82)
The Calculator Program
147(1)
Introduction to Pointcut Designators
148(1)
The Method Call Pointcut Designator
149(6)
Pointcut Composition
155(2)
Patterns and Signatures
157(9)
The Method Execution Pointcut Designator
166(4)
The Target Pointcut Designator
170(6)
The this Pointcut Designator
176(3)
The get and set Pointcut Designators
179(7)
/Capturing Context with the args Pointcut Designator
186(6)
Extracting Values with this and target
192(3)
The handler Pointcut Designator
195(3)
Initialization Pointcut Designators
198(8)
Static Scoping Pointcut Designators: within, withincode
206(3)
Dynamic Scoping Pointcut Designators: cflow, cflowbelow
209(7)
The adviceexecution Pointcut Designator
216(3)
The if Pointcut Designator
219(4)
How to Write a Good Pointcut
223(1)
Common Pitfalls
224(3)
Summary
227(2)
Take My Advice
229(44)
The Different Types of Advice
229(19)
Advice Parameters and Pointcuts
248(2)
Writing Logic in the Body of Advice
250(6)
Advice Ordering
256(9)
Softening Exceptions
265(2)
declare warning and declare error
267(2)
Common Pitfalls
269(2)
Summary
271(2)
References
271(2)
Inter-Type Declarations
273(28)
Fields, Methods, and Constructors
274(8)
Scope and Visibility
282(3)
Inter-Type Declarations and Interfaces
285(12)
Extending Classes
297(1)
Using Pointcuts and Advice with Inter-Type Declarations
298(1)
Summary
299(2)
Aspects
301(28)
Aspect Definition and Initialization
301(2)
Aspect Instantiation
303(15)
Aspect Inheritance
318(5)
Inner Aspects
323(1)
Aspect Privilege
324(2)
Common Pitfalls
326(1)
Summary
327(2)
Using the AspectJ API
329(26)
Package org.aspectj.lang
330(12)
Package org.aspectj.lang.reflect
342(11)
Summary
353(2)
Part 3 Putting It All Together
355(92)
Adopting AspectJ
357(58)
The Adoption Process
357(4)
Different Types of Aspects
361(1)
Enforcement Aspect Examples
362(12)
Infrastructure Aspect Examples
374(27)
Core Aspect Examples
401(11)
Evaluating the Simple Insurance Application
412(1)
Summary
413(2)
References
413(2)
Advanced AJDT
415(28)
Aspect Libraries
415(12)
Linking Aspects with Compiled .class Files
427(6)
Ant Integration
433(3)
Aspect Visualization
436(5)
Summary
441(2)
Aspect-Oriented Design
443(4)
Finding Aspects
443(2)
What Makes a Good Aspect?
445(1)
Closing Thoughts
446(1)
Appendix A Command-Line Aspect?
447(6)
A.1 Installing AspectJ
447(1)
A.2 Using the Compiler
448(2)
A.3 Building with Ant
450(3)
Appendix B AspectJ Language Quick Reference
453(8)
B.1 Aspect Declaration
453(1)
B.2 Pointcuts
454(3)
B.3 Wildcards
457(1)
B.4 Advice
457(2)
B.5 Inter-Type Declarations
459(2)
Appendix C Next Steps
461(6)
Mailing Lists and FAQ
461(3)
Raising Bugs and Enhancement Requests
464(1)
Contributing to the Development of AspectJ and AJDT
465(2)
Appendix D AJDT Icons Reference
467(4)
Objects
467(2)
Object Adornments
469(1)
Markers
469(1)
Build Configuration
470(1)
Index 471

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

PrefaceAspect-oriented programming grew out of research at the Palo Alto Research Center (PARC) during the 1990's. The first paper to use the term was aptly titled "Aspect-Oriented Programming" (Kicz97), and published in June of 1997. The first public release of AspectJ was in March of 1998, almost seven years ago. Interest in aspect-oriented programming (AOP) and in AspectJ has been growing steadily ever since.We still recall the excitement of seeing our first aspect-oriented programs run - it felt like magic! Today, we spend our time both developing the tools needed for aspect-oriented programming with AspectJ, and applying those tools to real-world problems. In the course of our work, we've had the privilege to introduce the ideas of aspect-oriented programming to many developers, architects, and executives. We've learnt that seeing AspectJ in use is a vital part of understanding these new ideas. For this reason, when we talk to people about AOP, we also show what it's like to work with an aspect-oriented program using the Eclipse AspectJ Development Tools (AJDT). AJDT helps to visualize the behaviour of AspectJ programs and reinforces understanding in a way that words alone cannot achieve.Our goal for this book is to teach you everything you need to understand aspect-oriented programming and to apply it successfully on your own projects. To that end, we'll be introducing the concepts of AOP, the AspectJ language, and the AspectJ Development Tools for Eclipse, in a single integrated package. We hope that as you work through the examples in the book, you will come to share our excitement at all that AOP has to offer. AcknowledgementsWe would like to thank the PARC team that created AspectJ, and especially those that we have had a chance to work with personally on the AspectJ project: Gregor Kiczales, Jim Hugunin, Erik Hilsdale, Mik Kersten, and Wes Isberg. Mik Kersten has been involved in the development of AJDT since its inception and has made great contributions to both the implementation and the vision of what aspect-oriented development support in an IDE should be. Julie Waterhouse has contributed to the development of AJDT since its very first release. Ron Bodkin helped to organise the first AOP workshop in IBM Hursley that helped us build the initial business case for our investment in AOP.We also thank all of the supporters and users of AspectJ and AJDT, your involvement with the project has been a crucial part of what AspectJ is today. Thank you too to the reviewers and editors for making this a much better book than it would otherwise be.Adrian thanks the IBM management team for showing enough belief in his crazy ideas to let him build a team and go after them. Most of all, he thanks his family: Sara, Rebecca, Elliott, and Derwent, for allowing him the time to work on this project. Like I didn't have enough to do already!Andy thanks the Hursley AOSD team for helping us build a development tool worth writing about: Sian Whiting, Matt Chapman, Helen Hawkins and Luzius Meisser. Most of all he thanks Julie for supporting him whilst writing this book and even reviewing some of the text when she had no idea what aspects were.George would like to thank Adrian, Andy, Matthew, Sian, Helen, Matt and Luzius for putting up with him on a daily basis. Thanks also go out to the AspectJ team for their intelligence, good humour and, of course, for creating something truly exceptional. An extra special debt of gratitude is owed to the very wonderful Katy, Eleanor and Dylan who put up with so much during the making of this book. I don't know where I would be without you.Matthew would like to thank Adrian for his visionary leadership of the AOSD team and for inviting him to join it. He has learned so much in the last two years and thanks the whole team for their

Rewards Program