Buying Options
AspectJ Cookbook
Print $44.95
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £34.50
Add to Cart
What is this?
Description

This hands-on book shows readers why and how common Java development problems can be solved by using new Aspect-oriented programming (AOP) techniques. With a wide variety of code recipes for solving day-to-day design and coding problems using AOP's unique approach, AspectJ Cookbook demonstrates that AOP is more than just a concept; it's a development process that will benefit users in an immediate and visible manner.

Full Description
Table of Contents
  1. Chapter 1 Aspect Orientation Overview

    1. A Brief History of Aspect Orientation

    2. AspectJ

    3. A Definition of Aspect Orientation

    4. Where to Go for More Information

  2. Chapter 2 Getting Started with AspectJ

    1. Introduction

    2. Installing AspectJ

    3. Developing a Simple Aspect

    4. Compiling an Aspect and Multiple Java Files

    5. Weaving Aspects into Jars

    6. Weaving Aspects at Load Time

    7. Generating Javadoc Documentation

    8. Compiling an AspectJ Project Using Eclipse

    9. Selecting the Aspects That Are Woven in a Build Within Eclipse

    10. Building an AspectJ Project Using Ant

  3. Chapter 3 Deploying AspectJ Applications

    1. Introduction

    2. Deploying a Command-Line AspectJ Application

    3. Deploying an AspectJ Application as a Fully Contained Executable JAR File

    4. Deploying a Java Servlet That Uses AspectJ

    5. Deploying a JSP That Uses AspectJ

    6. Deploying an Axis Web Service That Uses AspectJ

  4. Chapter 4 Capturing Joing Points on Methods

    1. Introduction

    2. Capturing a Method Call

    3. Capturing the Parameter Values Passed on a Method Call

    4. Capturing the Target of a Method Call

    5. Capturing a Method When It Is Executing

    6. Capturing the Value of the this Reference When a Method Is Executing

  5. Chapter 5 Capturing Join Points on Exception Handling

    1. Introduction

    2. Capturing When an Exception Is Caught

    3. Capturing the Thrown Exception

    4. Capturing the Object Handling the Exception

  6. Chapter 6 Capturing Join Points on Advice

    1. Introduction

    2. Capturing When Advice Is Executing

    3. Excluding Join Points That Are a Result of Advice Execution

    4. Exposing the Original Join Point When Advice Is Being Advised

  7. Chapter 7 Capturing Join Points on Class Object Construction

    1. Introduction

    2. Capturing a Call to a Constructor

    3. Capturing a Constructor When It Is Executing

    4. Capturing When an Object Is Initialized

    5. Capturing When an Object Is About to Be Initialized

    6. Capturing When a Class Is Initialized

  8. Chapter 8 Capturing Join Points on Attributes

    1. Introduction

    2. Capturing When an Object’s Attribute Is Accessed

    3. Capturing the Value of the Field Being Accessed

    4. Capturing When an Object’s Field Is Modified

    5. Capturing the Value of a Field When It Is Modified

  9. Chapter 9 Capturing Join Points Within Programmatic Scope

    1. Introduction

    2. Capturing All Join Points Within a Particular Class

    3. Capturing All Join Points Within a Particular Package

    4. Capturing All Join Points Within a Particular Method

  10. Chapter 10 Capturing Join Points Based on Control Flow

    1. Introduction

    2. Capturing All Join Points Within a Program’s Control Flow Initiated by an Initial Join Point

    3. Capturing All Join Points Within a Program’s Control Flow, Excluding the Initial Join Point

  11. Chapter 11 Capturing Join Points Based on Object Type

    1. Introduction

    2. Capturing When the this Reference Is a Specific Type

    3. Capturing When a Join Point’s Target Object Is a Specific Type

    4. Capturing When the Arguments to a Join Point Are a Certain Number, Type, and Ordering

  12. Chapter 12 Capturing Join Points Based on a Boolean or Combined Expression

    1. Introduction

    2. Capturing When a Runtime Condition Evaluates to True on a Join Point

    3. Combining Pointcuts Using a Logical AND (&&)

    4. Combining Pointcuts Using a Logical OR (||)

    5. Capturing All Join Points NOT Specified by a Pointcut Declaration

    6. Declaring Anonymous Pointcuts

    7. Reusing Pointcuts

  13. Chapter 13 Defining Advice

    1. Introduction

    2. Accessing Class Members

    3. Accessing the Join Point Context

    4. Executing Advice Before a Join Point

    5. Executing Advice Around a Join Point

    6. Executing Advice Unconditionally After a Join Point

    7. Executing Advice Only After a Normal Return from a Join Point

    8. Executing Advice Only After an Exception Has Been Raised in a Join Point

    9. Controlling Advice Precedence

    10. Advising Aspects

  14. Chapter 14 Defining Aspect Instantiation

    1. Introduction

    2. Defining Singleton Aspects

    3. Defining an Aspect per Instance

    4. Defining an Aspect per Control Flow

  15. Chapter 15 Defining Aspect Relationships

    1. Introduction

    2. Inheriting Pointcut Definitions

    3. Implementing Abstract Pointcuts

    4. Inheriting Classes into Aspects

    5. Declaring Aspects Inside Classes

  16. Chapter 16 Enhancing Classes and the Compiler

    1. Introduction

    2. Extending an Existing Class

    3. Declaring Inheritance Between Classes

    4. Implementing Interfaces Using Aspects

    5. Declaring a Default Interface Implementation

    6. Softening Exceptions

    7. Extending Compilation

  17. Chapter 17 Implementing Creational Object-Oriented Design Patterns

    1. Introduction

    2. Implementing the Singleton Pattern

    3. Implementing the Prototype Pattern

    4. Implementing the Abstract Factory Pattern

    5. Implementing the Factory Method Pattern

    6. Implementing the Builder Pattern

  18. Chapter 18 Implementing Structural Object-Oriented Design Patterns

    1. Introduction

    2. Implementing the Composite Pattern

    3. Implementing the Flyweight Pattern

    4. Implementing the Adapter Pattern

    5. Implementing the Bridge Pattern

    6. Implementing the Decorator Pattern

    7. Implementing the Proxy Pattern

  19. Chapter 19 Implementing Behavioral Object-Oriented Design Patterns

    1. Introduction

    2. Implementing the Observer Pattern

    3. Implementing the Command Pattern

    4. Implementing the Iterator Pattern

    5. Implementing the Mediator Pattern

    6. Implementing the Chain of Responsibility Pattern

    7. Implementing the Memento Pattern

    8. Implementing the Strategy Pattern

    9. Implementing the Visitor Pattern

    10. Implementing the Template Method Pattern

    11. Implementing the State Pattern

    12. Implementing the Interpreter Pattern

  20. Chapter 20 Applying Class and Component Scale Aspects

    1. Introduction

    2. Validating Parameters Passed to a Method

    3. Overriding the Class Instantiated on a Call to a Constructor

    4. Adding Persistence to a Class

    5. Applying Mock Components to Support Unit Testing

  21. Chapter 21 Applying Application Scale Aspects

    1. Introduction

    2. Applying Aspect-Oriented Tracing

    3. Applying Aspect-Oriented Logging

    4. Applying Lazy Loading

    5. Managing Application Properties

  22. Chapter 22 Applying Enterprise Scale Aspects

    1. Introduction

    2. Applying Development Guidelines and Rules

    3. Applying Transactions

    4. Applying Resource Pooling

    5. Remoting a Class Transparently Using RMI

    6. Applying a Security Policy

  23. Chapter 23 Applying Aspect-Oriented Design Patterns

    1. Introduction

    2. Applying the Cuckoo’s Egg Design Pattern

    3. Applying the Director Design Pattern

    4. Applying the Border Control Design Pattern

    5. Applying the Policy Design Pattern

  1. Appendix The AspectJ Runtime API

    1. org.aspectj.lang

    2. Signature

    3. org.aspectj.lang.reflect

    4. The SoftException Class

    5. The NoAspectBoundException Class

  2. Colophon

View Full Table of Contents
Product Details
Title:
AspectJ Cookbook
By:
Russell Miles
Publisher:
O'Reilly Media
Formats:
  • Print
  • Safari Books Online
Print Release:
December 2004
Pages:
360
Print ISBN:
978-0-596-00654-9
| ISBN 10:
0-596-00654-3
Customer Reviews
Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of AspectJ Cookbook is a marmoset.Marmosets are small monkeys (usually no bigger than an oversized rat) that live in the tropical and subtropical forests of South America.They are arboreal and incredibly agile.Their powerful hind legs, dextrous claw-like hands, and extra-long tails make swinging from branch to branch a breeze.

Marmosets are not too picky about what they eat.They are partial to tree sap (the stickier the better), but they also enjoy lizards, frogs, snails, insects, fruit, and nectar.

A group of marmosets (a social group consists of 8-20 individuals) communicates with facial expressions, body movements, and occasional squeaks. They also rely heavily on smell to identify each other.A highly adaptable species, marmosets can endure blistering temperatures and sparse forest environments. Because of this tenacity, they are not under serious threat, unlike most other primates. Matt Hutchinson was the production editor for AspectJ Cookbook. GEX, Inc. provided production services.Marlowe Shaeffer, Sarah Sherman, and Emily Quill provided quality control.

Emma Colby designed the cover of this book, based on a series design by Edie Freedman.The cover image is a 19th-century engraving from Illustrated Natural History. Clay Fernald produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.

Melanie Wang designed the interior layout, based on a series design by David Futato. This book was converted by Julie Hawks to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies.The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed.The illustrations that appear in the book were produced by Robert Romano, Jessamyn Read, and Lesley Borash using Macromedia FreeHand MX and Adobe Photoshop CS.The tip and warning icons were drawn by Christopher Bing. This colophon was written by Matt Hutchinson.

  • Book cover of AspectJ Cookbook