| |
| |
Preface | |
| |
| |
| |
Aspect Orientation Overview | |
| |
| |
| |
AspectJ | |
| |
| |
| |
A Definition Of Aspect Orientation | |
| |
| |
| |
Where To Go For More Information | |
| |
| |
| |
Getting Started With AspectJ | |
| |
| |
| |
Installing AspectJ | |
| |
| |
| |
Developing A Simple Aspect | |
| |
| |
| |
Compiling an Aspect and Multiple Java Files | |
| |
| |
| |
Weaving Aspects into Jars | |
| |
| |
| |
Weaving Aspects at Load-Time | |
| |
| |
| |
Generating Javadoc Documentation | |
| |
| |
| |
Compiling an AspectJ Project using Eclipse | |
| |
| |
| |
Selecting the Aspects that are Woven in a Build within Eclipse | |
| |
| |
| |
Building an AspectJ Project using Ant | |
| |
| |
| |
| |
| |
| |
| |
Deploying a Command Line AspectJ Application | |
| |
| |
| |
Deploying an AspectJ Application as a fully contained Executable .Jar file | |
| |
| |
| |
Deploying a Java Servlet that uses AspectJ | |
| |
| |
| |
Deploying a JSP that uses AspectJ | |
| |
| |
| |
Deploying an Axis Web Service that uses AspectJ | |
| |
| |
| |
Capturing Join Points on Methods | |
| |
| |
| |
Capturing a Method Call | |
| |
| |
| |
Capturing the Parameter Values passed on a Method Call | |
| |
| |
| |
Capturing the Target of a Method Call | |
| |
| |
| |
Capturing a Method when it is Executing | |
| |
| |
| |
Capturing the Value of the "this" Reference when a Method is Executing | |
| |
| |
| |
Capturing Join Points on Exception Handling | |
| |
| |
| |
Capturing when an Exception is Caught | |
| |
| |
| |
Capturing the Thrown Exception | |
| |
| |
| |
Capturing the Object Handling the Exception | |
| |
| |
| |
Capturing Join Points on Advice | |
| |
| |
| |
Capturing when Advice is Executing | |
| |
| |
| |
Excluding Join Points that are a Result of Advice Execution | |
| |
| |
| |
Exposing the original Join Point when Advice is being Advised | |
| |
| |
| |
Capturing Join Points on Class and Object Construction | |
| |
| |
| |
Capturing a Call to a Constructor | |
| |
| |
| |
Capturing a Constructor when it is Executing | |
| |
| |
| |
Capturing when an Object is Initialized | |
| |
| |
| |
Capturing when an Object is about to be Initialized | |
| |
| |
| |
Capturing when a Class is Initialized | |
| |
| |
| |
Capturing Join Points on Attributes | |
| |
| |
| |
Capturing when an Object''s Attribute is Accessed | |
| |
| |
| |
Capturing the Value of the Field being Accessed | |
| |
| |
| |
Capturing when an Object''s Field is Modified | |
| |
| |
| |
Capturing the Value of a Field when it is Modified | |
| |
| |
| |
Capturing Join Points within Programmatic Scope | |
| |
| |
| |
Capturing all Join Points within a particular Class | |
| |
| |
| |
Capturing all Join Points within a particular Package | |
| |
| |
| |
Capturing all Join Points within a particular Method | |
| |
| |
| |
Capturing Join Points based on Control Flow | |
| |
| |
| |
Capturing all Join Points within a Program''s Control Flow initiated by an Initial Join Point | |
| |
| |
| |
Capturing all Join Points within a Program''s Control Flow, Excluding the Initial Join Point | |
| |
| |
| |
Capturing Join Points based on Object Type | |
| |
| |
| |
Capturing when the "this" reference is a specific Type | |
| |
| |
| |
Capturing when a Join Point''s Target Object is a specific Type | |
| |
| |
| |
Capturing when the Arguments to a Join Point are a certain Number, Type and Ordering | |
| |
| |
| |
Capturing Join Points based on a Boolean or Combined Expression | |
| |
| |
| |
Capturing when a Runtime Condition evaluates to True on a Join Point | |
| |
| |
| |
Combining Pointcuts Using a Logical AND (&) | |
| |
| |
| |
Combining Pointcuts Using a Logical OR () | |
| |
| |
| |
Capturing all Join Points NOT specified by a Pointcut Definition | |
| |
| |
| |
Declaring Anonymous Pointcuts | |
| |
| |
| |
Reusing Pointcuts | |
| |
| |
| |
Defining Advice | |
| |
| |
| |
Accessing Class Members | |
| |
| |
| |
Accessing the Join Point Context | |
| |
| |
| |
Executing Advice Before a Join Point | |
| |
| |
| |
Executing Advice Around a Join Point | |
| |
| |
| |
Executing Advice Unconditionally After a Join Point | |
| |
| |
| |
Executing Advice Only After a Normal Return from a Join Point | |
| |
| |
| |
Executing Advice Only After an Exception has been raised in a Join Point | |
| |
| |
| |
Controlling Advice Precedence | |
| |
| |
| |
Advising Aspects | |
| |
| |
| |
Defining Aspect Instantiation | |
| |
| |
| |
Defining Singleton Aspects | |
| |
| |
| |
Defining an Aspect Per-Instance | |
| |
| |
| |
Defining an Aspect Per-Control Flow | |
| |
| |
| |
Defining Aspect Relationships | |
| |
| |
| |
Inheriting Pointcut Definitions | |
| |
| |
| |
Implementing Abstract Pointcuts | |
| |
| |
| |
Inheriting Classes into Aspects | |
| |
| |
| |
Declaring Aspects Inside Classes | |
| |
| |
| |
Enhancing Classes and the Compiler | |
| |
| |
| |
Extending An Existing Class | |
| |
| |
| |
Declaring Inheritance between Classes | |
| |
| |
| |
Implementing Interfaces using Aspects | |
| |
| |
| |
Declaring a Default Interface Implementation | |
| |
| |
| |
Softening Exceptions | |
| |
| |
| |
Extending Compilation | |
| |
| |
| |
Implementing Creational Object-Oriented Design Patterns | |
| |
| |
| |
Implementing the Singleton Pattern | |
| |
| |
| |
Implementing the Prototype Pattern | |
| |
| |
| |
Implementing the Abstract Factory Pattern | |
| |
| |
| |
Implementing the Factory Method Pattern | |
| |
| |
| |
Implementing the Builder Pattern | |
| |
| |
| |
Implementing Structural Object-Oriented Design Patterns | |
| |
| |
| |
Implementing the Composite Pattern | |
| |
| |
| |
Implementing the Flyweight Pattern | |
| |
| |
| |
Implementing the Adapter Pattern | |
| |
| |
| |
Implementing the Bridge Pattern | |
| |
| |
| |
Implementing the Decorator Pattern | |
| |
| |
| |
Implementing the Proxy Pattern | |
| |
| |
| |
Implementing Behavioral Object-Oriented Design Patterns | |
| |
| |
| |
Implementing the Observer Pattern | |
| |
| |
| |
Implementing the Command Pattern | |
| |
| |
| |
Implementing the Iterator Pattern | |
| |
| |
| |
Implementing the Mediator Pattern | |
| |
| |
| |
Implementing the Chain of Responsibility Pattern | |
| |
| |
| |
Implementing the Memento Pattern | |
| |
| |
| |
Implementing the Strategy Pattern | |
| |
| |
| |
Implementing the Visitor Pattern | |
| |
| |
| |
Implementing the Template Method Pattern | |
| |
| |
| |
Implementing the State Pattern | |
| |
| |
| |
Implementing the Interpreter Pattern | |
| |
| |
| |
Applying Class and Component Scale Aspects | |
| |
| |
| |
Validating Parameters Passed to a Method | |
| |
| |
| |
Overriding the Class Instantiated on a Call to a Constructor | |
| |
| |
| |
Adding Persistence to a Class | |
| |
| |
| |
Applying Mock Components to Support Unit Testing | |
| |
| |
| |
Applying Application Scale Aspects | |
| |
| |
| |
Applying Aspect-Oriented Tracing | |
| |
| |
| |
Applying Aspect-Oriented Logging | |
| |
| |
| |
Applying Lazy Loading | |
| |
| |
| |
Managing Application Properties | |
| |
| |
| |
Applying Enterprise Scale Aspects | |
| |
| |
| |
Applying Development Guidelines and Rules | |
| |
| |
| |
Applying Transactions | |
| |
| |
| |
Applying Resource Pooling | |
| |
| |
| |
Remoting a Class Transparently using RMI | |
| |
| |
| |
Applying a Security Policy | |
| |
| |
| |
Applying Aspect-Oriented Design Patterns | |
| |
| |
| |
Applying the Cuckoo''s Egg Design Pattern | |
| |
| |
| |
Applying the Director Design Pattern | |
| |
| |
| |
Applying the Border Control Design Pattern | |
| |
| |
| |
Applying the Policy Design PatternA. The AspectJ Runtime API | |
| |
| |
Index | |