Information AboutAspectj |
| CATEGORIES ABOUT ASPECTJ | |
| programming languages | |
| java programming language family | |
| aspect-oriented programming | |
|
In March 2005, AspectWerkz merged with AspectJ to form a single language. Other commercial Aspect-oriented Framework s include JBoss and Spring AOP . SIMPLE LANGUAGE DESCRIPTION All valid Java programs are also valid AspectJ programs, but AspectJ also allows programmers to define special constructs called ''aspects''. Aspects can contain several entities unavailable to standard classes. These are:
:: aspect VisitAspect {::: Point.acceptVisitor(Visitor v) {:::: v.visit(this);::: }:: }
:: after () : set() {::: Display.update();:: }See the AspectJ Programming Guide for a more detailed description of the language. TOOLS, COMPILATION, AND ASPECTJ The compilation of an AspectJ program includes an additional stage compared to non-aspect-oriented languages. This stage is called ''weaving''. Weaving occurs after the normal compilation of the non-aspect, or ''base code'', completes. The weaving process takes the aspects (pointcuts and advice) and determines where the advice may apply and alters the bytecode appropriately. Weaving may occur immediately after compilation, or this process may be delayed until the classes are loaded into the JVM . This process is known as load-time weaving. The most widely used and most efficient compiler for AspectJ is maintained with the AspectJ project, but there is another, more extensible and research oriented, compiler called the Aspect Bench Compiler, or abc . A suite of tools designed specifically to work with AspectJ in the Eclipse Java IDE has been developed as another project in the Eclipse Foundation . It is called AJDT . These tools help programmers understand how the aspects crosscut the base code. SEE ALSO EXTERNAL LINKS
|
|
|