ABSTRACT
We describe an extension to the Java language, Handi-Wrap, that supports weaving aspects into code at runtime. Aspects in Handi-Wrap take the form of method wrappers, which allow aspect code to be inserted around method bodies like advice in AspectJ. Handi-Wrap offers several advantages over static aspect languages such as AspectJ. First, aspects can be woven into binary libraries. Second, a wrapper in Handi-Wrap is a first-class Java value, which allows users to exploit Java mechanisms to define and weave wrappers. For example, wrappers can be passed explicit constructor arguments, and wrapper objects can be composed. Finally, methods in all Java classes, including anonymous classes, can be wrapped. A prototype of Handi-Wrap is implemented in a compile-time metaprogramming system for Java, called Maya; we briefly describe how Maya's features support Handi-Wrap.
- J. Bachrach and K. Playford. The Java syntactic extender (JSE). In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, Oct. 2001.]] Google ScholarDigital Library
- J. Baker. Macros that play: Migrating from Java to Maya. Master's thesis, University of Utah, December 2001.]]Google Scholar
- J. Baker and W. Hsieh. Maya: Multiple-dispatch syntax extension in Java. To appear in Proceedings of the Conference on Programming Language Design and Implementation, Jun.]] Google ScholarDigital Library
- D. Batory, B. Lofaso, and Y. Smaragdakis. JTS: Tools for implementing domain-specific languages. In 5th International Conference on Software Reuse, 1998.]] Google ScholarDigital Library
- K. Böllert. On weaving aspects. In ECOOP Workshop on Aspect-Oriented Programming, 1999.]] Google ScholarDigital Library
- P. Bothner. Kawa---compiling dynamic languages to the Java VM. In Proceedings of the USENIX Technical Conference, FREENIX Track, New Orleans, LA, Jun. 1998. USENIX Association.]] Google ScholarDigital Library
- G. Bracha, M. Odersky, D. Stoutamire, and P. Wadler. Making the future safe for the past: Adding genericity to the Java programming language. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, Vancouver, October 1998. ACM.]] Google ScholarDigital Library
- A. Bryant, A. Catton, K. D. Volder, and G. C. Murphy. Explicit programming. In Proceedings of the First International Conference on Aspect-Oriented Software Development, Apr. 2002.]] Google ScholarDigital Library
- M. Büchi and W. Weck. Generic wrappers. In Proceedings of the European Conference on Object-Oriented Programming, pages 201-225, 2000.]] Google ScholarDigital Library
- C. Clifton, G. Leavens, C. Chambers, and T. Millstein. MultiJava: Modular open classes and symmetric multiple dispatch for Java. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications '00, pages 130-146, Minneapolis, MN, Oct. 2000.]] Google ScholarDigital Library
- K. Czarnecki. Dynamic cool. http://www.prakinf.tu-ilmenau.de/-czarn/aop/sources.tar.gz.]]Google Scholar
- K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Techniques, and Applications, chapter 8. Addison-Wesley, 1999.]] Google ScholarDigital Library
- M. Dahm. The byte code engineering library. http://bcel.sourceforge.net.]]Google Scholar
- P.-C. David, T. Ledoux, and N. N. M. Bouraqadi-Saädani. Two-step weaving with reflection using AspectJ. In OOPSLA Workshop on Advanced Separation of Concerns in Object-Oriented Systems, Oct. 2001.]]Google Scholar
- M. Flatt, S. Krishnamurthi, and M. Felleisen. Classes and mixins. In Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pages 171-183, 1998.]] Google ScholarDigital Library
- M. Goedicke, G. Neumann, and U. Zdun. Design and implemenation constructs for the development of flexible, component-oriented software architectures. In Proceedings of the Second International Symposium on Generative and Component-Based Software Engineering, pages 114-128, 2000.]] Google ScholarDigital Library
- S. Henenberg and R. Unland. Using and reusing aspects in AspectJ. In OOPSLA Workshop on Advanced Separation of Concerns in Object-Oriented Systems, Oct. 2001.]]Google Scholar
- N. D. Hoa. Dynamic aspects in SOFA/DCUP. Technical Report 99/07, Charles University, Prague, Jun. 1999.]]Google Scholar
- K. Lieberherr, D. Lorenz, and M. Mezini. Programming with aspectual components. Technical Report NU-CCS-99-01, Northeastern University, Apr. 1999.]]Google Scholar
- C. P. Lunau. A reflective architecture for process control applications. In Proceedings of the European Conference on Object-Oriented Programming, 1997.]]Google ScholarCross Ref
- P. Niemeyer. Beanshell --- lightweight scripting for Java. http://www.beanshell.org/.]]Google Scholar
- K. Ostermann and M. Mezini. Object-oriented composition untangled. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, Oct. 2001.]] Google ScholarDigital Library
- R. Pawlak, L. Seinturier, L. Duchien, and G. Florin. JAC: A flexible solution for aspect-oriented programming in Java. In Reflection 2001, pages 1-24, 2001. LNCS 2192.]] Google ScholarDigital Library
- G. Steele Jr. Common Lisp, the Language. Digital Press, second edition, 1990.]] Google ScholarDigital Library
- M. Tatsubori, S. Chiba, M. Killijian, and K. Itano. Reflection and Software Engineering, volume 1826 of Lecture Notes in Computer Science, chapter Open Java: a class-based macro system for Java. Springer Verlag, 2000.]] Google ScholarDigital Library
- Xerox. The AspectJ programming guide. http://www.aspectj_org/doc/dist/progguide/.]]Google Scholar
Index Terms
- Runtime aspect weaving through metaprogramming
Recommendations
Dynamic weaving for aspect-oriented programming
AOSD '02: Proceedings of the 1st international conference on Aspect-oriented software developmentWhen using Aspect Oriented Programming in the development of software components, a developer must understand the program units actually changed by weaving, how they behave, and possibly correct the aspects used. Support for rapid AOP prototyping and ...
Comprehensive aspect weaving for Java
Aspect-oriented programming (AOP) has been successfully applied to application code thanks to techniques such as Java bytecode instrumentation. Unfortunately, with existing AOP frameworks for Java such as AspectJ, aspects cannot be woven into the ...
Building Composable Aspect-Specific Languages with Logic Metaprogramming
GPCE '02: Proceedings of the 1st ACM SIGPLAN/SIGSOFT conference on Generative Programming and Component EngineeringThe goal of aspect-oriented programming is to modularize crosscutting concerns (or aspects) at the code level. These aspects can be defined in either a general-purpose language or in a language that is fine-tuned to a specific aspect in consideration. ...
Comments