AspectJ is an aspect-oriented extension of the Java language created by PARC. The language is available in Eclipse Foundation projects both separately and as part of the Eclipse development environment . The language has become the de facto standard for aspect-oriented programming, emphasizing simplicity and user friendliness. Since the first release, the language uses Java-like syntax.
| Aspectj | |
|---|---|
| Language class | aspect oriented |
| Appeared in | |
| Developer | Eclipse foundation |
| File extension | |
| Release | |
| Main implementations | AspectJ Development Tools for Eclipse |
| Influenced | |
| License | Eclipse Public License |
| Site | eclipse.org/aspectj/ |
| OS | Cross-platform |
Simple language description
AspectJ extends the syntax of Java, that is, all programs written in Java will be valid AspectJ programs, but not vice versa, as they may include special constructs called aspects, which may contain several parts that are not accessible to ordinary classes.
- Extension methods allow the programmer to add methods, fields, and interfaces to existing classes. This example adds the
acceptVisitormethod (see the visitor design pattern) to the code of thePointclass:
aspect VisitAspect {
void Point . acceptVisitor ( Visitor v ) {
v . visit ( this );
}
}
Bibliography
- Laddad, Ramnivas (September 28, 2009), AspectJ in Action: Enterprise AOP with Spring (2nd ed.), Manning Publications , p. 550, ISBN 978-1-933988-05-4
- Miles, Russ (December 20, 2004), AspectJ Cookbook (1st ed.), O'Reilly Media , p. 354, ISBN 978-0-596-00654-9 , < http://oreilly.com/catalog/9780596006549/ >
- Colyer, Adrian; Clement, Andy; Harley, George & Webster, Matthew (December 24, 2004), Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools (1st ed.), Addison-Wesley Professional , p. 504, ISBN 978-0-321-24587-8 , < http://www.informit.com/store/product.aspx?isbn=0321245873 >
- Gradecki, Joseph D. & Lesiecki, Nicholas (March 7, 2003), Mastering AspectJ: Aspect-Oriented Programming in Java (1st ed.), Wiley , p. 456, ISBN 978-0-471-43104-6 , < http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471431044.html >
See also
- Aspect Oriented Programming