
AspectJ Cookbook
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Table of Contents
- Preface
- Audience
- About This Book
- Assumptions This Book Makes
- Conventions Used in This Book
- Using the Code Examples
- We'd Like to Hear from You
- Safari Books Online
- Acknowledgments
- Aspect Orientation Overview
- A Brief History of Aspect Orientation
- AspectJ
- A Definition of Aspect Orientation
- Cross-Cutting Concerns
- Aspects
- Advice
- Join Points
- Pointcuts
- Putting It All Together
- Where to Go for More Information
- Getting Started with AspectJ
- 2.0 Introduction
- 2.1 Installing AspectJ
- Problem
- Solution
- Discussion
- See Also
- 2.2 Developing a Simple Aspect
- Problem
- Solution
- Discussion
- See Also
- 2.3 Compiling an Aspect and Multiple Java Files
- Problem
- Solution
- Discussion
- See Also
- 2.4 Weaving Aspects into Jars
- Problem
- Solution
- Discussion
- See Also
- 2.5 Weaving Aspects at Load Time
- Problem
- Solution
- Discussion
- See Also
- 2.6 Generating Javadoc Documentation
- Problem
- Solution
- Discussion
- See Also
- 2.7 Compiling an AspectJ Project Using Eclipse
- Problem
- Solution
- Discussion
- See Also
- 2.8 Selecting the Aspects That Are Woven in a Build Within Eclipse
- Problem
- Solution
- Discussion
- See Also
- 2.9 Building an AspectJ Project Using Ant
- Problem
- Solution
- Discussion
- See Also
- Deploying AspectJ Applications
- 3.0 Introduction
- 3.1 Deploying a Command-Line AspectJ Application
- Problem
- Solution
- Discussion
- See Also
- 3.2 Deploying an AspectJ Application as a Fully Contained Executable JAR File
- Problem
- Solution
- Discussion
- See Also
- 3.3 Deploying a Java Servlet That Uses AspectJ
- Problem
- Solution
- Discussion
- See Also
- 3.4 Deploying a JSP That Uses AspectJ
- Problem
- Solution
- Discussion
- See Also
- 3.5 Deploying an Axis Web Service That Uses AspectJ
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points on Methods
- 4.0 Introduction
- 4.1 Capturing a Method Call
- Problem
- Solution
- Discussion
- See Also
- 4.2 Capturing the Parameter Values Passed on a Method Call
- Problem
- Solution
- Discussion
- See Also
- 4.3 Capturing the Target of a Method Call
- Problem
- Solution
- Discussion
- See Also
- 4.4 Capturing a Method When It Is Executing
- Problem
- Solution
- Discussion
- See Also
- 4.5 Capturing the Value of the this Reference When a Method Is Executing
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points on Exception Handling
- 5.0 Introduction
- 5.1 Capturing When an Exception Is Caught
- Problem
- Solution
- Discussion
- See Also
- 5.2 Capturing the Thrown Exception
- Problem
- Solution
- Discussion
- See Also
- 5.3 Capturing the Object Handling the Exception
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points on Advice
- 6.0 Introduction
- 6.1 Capturing When Advice Is Executing
- Problem
- Solution
- Discussion
- See Also
- 6.2 Excluding Join Points That Are a Result of Advice Execution
- Problem
- Solution
- Discussion
- See Also
- 6.3 Exposing the Original Join Point When Advice Is Being Advised
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points on Class and Object Construction
- 7.0 Introduction
- 7.1 Capturing a Call to a Constructor
- Problem
- Solution
- Discussion
- See Also
- 7.2 Capturing a Constructor When It Is Executing
- Problem
- Solution
- Discussion
- See Also
- 7.3 Capturing When an Object Is Initialized
- Problem
- Solution
- Discussion
- See Also
- 7.4 Capturing When an Object Is About to Be Initialized
- Problem
- Solution
- Discussion
- See Also
- 7.5 Capturing When a Class Is Initialized
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points on Attributes
- 8.0 Introduction
- 8.1 Capturing When an Object's Attribute Is Accessed
- Problem
- Solution
- Discussion
- See Also
- 8.2 Capturing the Value of the Field Being Accessed
- Problem
- Solution
- Discussion
- See Also
- 8.3 Capturing When an Object's Field Is Modified
- Problem
- Solution
- Discussion
- See Also
- 8.4 Capturing the Value of a Field When It Is Modified
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points Within Programmatic Scope
- 9.0 Introduction
- 9.1 Capturing All Join Points Within a Particular Class
- Problem
- Solution
- Discussion
- See Also
- 9.2 Capturing All Join Points Within a Particular Package
- Problem
- Solution
- Discussion
- See Also
- 9.3 Capturing All Join Points Within a Particular Method
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points Based on Control Flow
- 10.0 Introduction
- 10.1 Capturing All Join Points Within a Program's Control Flow Initiated by an Initial Join Point
- Problem
- Solution
- Discussion
- See Also
- 10.2 Capturing All Join Points Within a Program's Control Flow, Excluding the Initial Join Point
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points Based on Object Type
- 11.0 Introduction
- 11.1 Capturing When the this Reference Is a Specific Type
- Problem
- Solution
- Discussion
- See Also
- 11.2 Capturing When a Join Point's Target Object Is a Specific Type
- Problem
- Solution
- Discussion
- See Also
- 11.3 Capturing When the Arguments to a Join Point Are a Certain Number, Type, and Ordering
- Problem
- Solution
- Discussion
- See Also
- Capturing Join Points Based on a Boolean or Combined Expression
- 12.0 Introduction
- 12.1 Capturing When a Runtime Condition Evaluates to True on a Join Point
- Problem
- Solution
- Discussion
- See Also
- 12.2 Combining Pointcuts Using a Logical AND (&&)
- Problem
- Solution
- Discussion
- See Also
- 12.3 Combining Pointcuts Using a Logical OR (||)
- Problem
- Solution
- Discussion
- See Also
- 12.4 Capturing All Join Points NOT Specified by a Pointcut Declaration
- Problem
- Solution
- Discussion
- See Also
- 12.5 Declaring Anonymous Pointcuts
- Problem
- Solution
- Discussion
- See Also
- 12.6 Reusing Pointcuts
- Problem
- Solution
- Discussion
- See Also
- Defining Advice
- 13.0 Introduction
- 13.1 Accessing Class Members
- Problem
- Solution
- Discussion
- See Also
- 13.2 Accessing the Join Point Context
- Problem
- Solution
- Discussion
- See Also
- 13.3 Executing Advice Before a Join Point
- Problem
- Solution
- Discussion
- See Also
- 13.4 Executing Advice Around a Join Point
- Problem
- Solution
- Discussion
- See Also
- 13.5 Executing Advice Unconditionally After a Join Point
- Problem
- Solution
- Discussion
- See Also
- 13.6 Executing Advice Only After a Normal Return from a Join Point
- Problem
- Solution
- Discussion
- See Also
- 13.7 Executing Advice Only After an Exception Has Been Raised in a Join Point
- Problem
- Solution
- Discussion
- See Also
- 13.8 Controlling Advice Precedence
- Problem
- Solution
- Discussion
- See Also
- 13.9 Advising Aspects
- Problem
- Solution
- Discussion
- See Also
- Defining Aspect Instantiation
- 14.0 Introduction
- 14.1 Defining Singleton Aspects
- Problem
- Solution
- Discussion
- See Also
- 14.2 Defining an Aspect per Instance
- Problem
- Solution
- Discussion
- See Also
- 14.3 Defining an Aspect per Control Flow
- Problem
- Solution
- Discussion
- See Also
- Defining Aspect Relationships
- 15.0 Introduction
- 15.1 Inheriting Pointcut Definitions
- Problem
- Solution
- Discussion
- See Also
- 15.2 Implementing Abstract Pointcuts
- Problem
- Solution
- Discussion
- See Also
- 15.3 Inheriting Classes into Aspects
- Problem
- Solution
- Discussion
- See Also
- 15.4 Declaring Aspects Inside Classes
- Problem
- Solution
- Discussion
- See Also
- Enhancing Classes and the Compiler
- 16.0 Introduction
- 16.1 Extending an Existing Class
- Problem
- Solution
- Discussion
- See Also
- 16.2 Declaring Inheritance Between Classes
- Problem
- Solution
- Discussion
- See Also
- 16.3 Implementing Interfaces Using Aspects
- Problem
- Solution
- Discussion
- See Also
- 16.4 Declaring a Default Interface Implementation
- Problem
- Solution
- Discussion
- See Also
- 16.5 Softening Exceptions
- Problem
- Solution
- Discussion
- See Also
- 16.6 Extending Compilation
- Problem
- Solution
- Discussion
- See Also
- Implementing Creational Object- Oriented Design Patterns
- 17.0 Introduction
- 17.1 Implementing the Singleton Pattern
- Problem
- Solution
- Discussion
- See Also
- 17.2 Implementing the Prototype Pattern
- Problem
- Solution
- Discussion
- See Also
- 17.3 Implementing the Abstract Factory Pattern
- Problem
- Solution
- Discussion
- See Also
- 17.4 Implementing the Factory Method Pattern
- Problem
- Solution
- Discussion
- See Also
- 17.5 Implementing the Builder Pattern
- Problem
- Solution
- Discussion
- See Also
- Implementing Structural Object- Oriented Design Patterns
- 18.0 Introduction
- 18.1 Implementing the Composite Pattern
- Problem
- Solution
- Discussion
- See Also
- 18.2 Implementing the Flyweight Pattern
- Problem
- Solution
- Discussion
- See Also
- 18.3 Implementing the Adapter Pattern
- Problem
- Solution
- Discussion
- See Also
- 18.4 Implementing the Bridge Pattern
- Problem
- Solution
- Discussion
- See Also
- 18.5 Implementing the Decorator Pattern
- Problem
- Solution
- Discussion
- See Also
- 18.6 Implementing the Proxy Pattern
- Problem
- Solution
- Discussion
- See Also
- Implementing Behavioral Object- Oriented Design Patterns
- 19.0 Introduction
- 19.1 Implementing the Observer Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.2 Implementing the Command Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.3 Implementing the Iterator Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.4 Implementing the Mediator Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.5 Implementing the Chain of Responsibility Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.6 Implementing the Memento Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.7 Implementing the Strategy Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.8 Implementing the Visitor Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.9 Implementing the Template Method Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.10 Implementing the State Pattern
- Problem
- Solution
- Discussion
- See Also
- 19.11 Implementing the Interpreter Pattern
- Problem
- Solution
- Discussion
- See Also
- Applying Class and Component Scale Aspects
- 20.0 Introduction
- 20.1 Validating Parameters Passed to a Method
- Problem
- Solution
- Discussion
- See Also
- 20.2 Overriding the Class Instantiated on a Call to a Constructor
- Problem
- Solution
- Discussion
- See Also
- 20.3 Adding Persistence to a Class
- Problem
- Solution
- Discussion
- See Also
- 20.4 Applying Mock Components to Support Unit Testing
- Problem
- Solution
- Discussion
- See Also
- Applying Application Scale Aspects
- 21.0 Introduction
- 21.1 Applying Aspect-Oriented Tracing
- Problem
- Solution
- Discussion
- See Also
- 21.2 Applying Aspect-Oriented Logging
- Problem
- Solution
- Discussion
- See Also
- 21.3 Applying Lazy Loading
- Problem
- Solution
- Discussion
- See Also
- 21.4 Managing Application Properties
- Problem
- Solution
- Discussion
- See Also
- Applying Enterprise Scale Aspects
- 22.0 Introduction
- 22.1 Applying Development Guidelines and Rules
- Problem
- Solution
- Discussion
- See Also
- 22.2 Applying Transactions
- Problem
- Solution
- Discussion
- See Also
- 22.3 Applying Resource Pooling
- Problem
- Solution
- Discussion
- See Also
- 22.4 Remoting a Class Transparently Using RMI
- Problem
- Solution
- Discussion
- See Also
- 22.5 Applying a Security Policy
- Problem
- Solution
- Discussion
- See Also
- Applying Aspect-Oriented Design Patterns
- 23.0 Introduction
- 23.1 Applying the Cuckoo's Egg Design Pattern
- Problem
- Solution
- Discussion
- See Also
- 23.2 Applying the Director Design Pattern
- Problem
- Solution
- Discussion
- See Also
- 23.3 Applying the Border Control Design Pattern
- Problem
- Solution
- Discussion
- See Also
- 23.4 Applying the Policy Design Pattern
- Problem
- Solution
- Discussion
- See Also
- The AspectJ Runtime API
- org.aspectj.lang
- JoinPoint and JoinPoint.StaticPart
- The JoinPoint interface
- The JoinPoint.StaticPart interface
- Signature
- The Signature Interface
- org.aspectj.lang.reflect
- The Specialized Subinterfaces of Signature
- The AdviceSignature interface
- The CatchClauseSignature interface
- The CodeSignature interface
- The ConstructorSignature interface
- The FieldSignature interface
- The InitializerSignature interface
- The MemberSignature interface
- The MethodSignature interface
- SourceLocation
- The SoftException Class
- The NoAspectBoundException Class
- Index
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.