Information Technology Reference
In-Depth Information
Join points. A join point model makes it possible to define the structure of cross-
cutting concerns. Join points are well-defined points in the execution flow of
a program [59], such as method calls, constructors, function calls etc. Join
points can therefore be considered as places in a program where aspects may
be applied.
Pointcuts. A pointcut is a means used to identify a join point. This is typically
a filter mechanism that defines a subset of join points [59]. A cflow is a
type of pointcut that identifies join points based on whether they occur in
the dynamic context of other join points. For example, the cflow statement
cflow(move()) in the AspectJ language picks out each join point that occurs
between when the move() method is called and when it returns, which may
occur multiple times in the case of a recursive call [6].
Advice. The advice is used to define additional code that is run at join points.
In most AOP languages there are a number of different advice declarations
that define when the advice runs when a join point is reached. These are
typically before, after, or around the join point.
Weaving. The process of adding aspects to existing code to produce a coherent pro-
gram is known as weaving . Weaving is either done at compile time (static
weaving) or at runtime (dynamic weaving) and some systems, such as com-
position filters [12], allow aspects to be added and removed dynamically.
Weaving is achieved using a technique known as bytecode rewriting, which
alters existing bytecode, either dynamically as it is loaded or statically by
altering the bytecode contained in an existing class file.
As well as the above general AOP semantics, various aspect implementations
provide their own semantics.
3.4 Static and Dynamic Weaving
Static weaving refers to the modification of the source code of a class by inserting
aspect-specific statements at join points [21]. Java applications are compiled to
bytecode, a portable format that is interpreted by the Java virtual machine at
runtime, and consequently most Java AOP systems alter the bytecode, not the
source code. This has the added advantage of allowing Java AOP systems to be
used where the source code is not available.
Dynamic weaving refers to the ability to weave and unweave aspects at run-
time without having to restart the application [84].
A number of methods have been proposed to implement aspect-oriented func-
tionality. These can be broadly classified as language-based implementations,
framework-based implementations and domain-specific language implementations.
Search WWH ::




Custom Search