Abstract
To simplify the constructs that programmers have to learn for using paradigms, we extend methods to a new language construct, a method slot, to support both the event-handler paradigm and the aspect paradigm. A method slot is an object’s property that can keep more than one function closure and be called like a method. We also propose a Java-based language, DominoJ, which replaces methods in Java with method slots, and explains the behavior of method slots and the operators. Then we evaluate the coverage of expressive ability of method slots by comparing DominoJ with other languages in detail. The feasibility of method slots is shown as well by implementing a prototype compiler and running a preliminary microbenchmark for it.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Bergmans, L., Aksit, M.: Composing crosscutting concerns using composition filters. Commun. ACM 44(10), 51–57 (2001)
Chiba, S., Igarashi, A., Zakirov, S.: Mostly modular compilation of crosscutting concerns by contextual predicate dispatch. In: OOPSLA 2010, pp. 539–554. ACM (2010)
Dedecker, J., Van Cutsem, T., Mostinckx, S., D’Hondt, T., De Meuter, W.: Ambient-oriented programming in AmbientTalk. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 230–254. Springer, Heidelberg (2006)
Drossopoulou, S., et al.: \(\mathcal{F}\) ickle: Dynamic object re-classification. In: Lindskov Knudsen, J. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 130–149. Springer, Heidelberg (2001)
Ernst, M., Kaplan, C., Chambers, C.: Predicate dispatching: A unified theory of dispatch. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 186–211. Springer, Heidelberg (1998)
Eugster, P., Jayaram, K.R.: EventJava: An extension of Java for event correlation. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 570–594. Springer, Heidelberg (2009)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. Addison-Wesley (1994)
Garlan, D., Jha, S., Notkin, D., Dingel, J.: Reasoning about implicit invocation. In: SIGSOFT 1998/FSE-6, pp. 209–221. ACM (1998)
Gasiunas, V., Satabin, L., Mezini, M., Núñez, A., Noyé, J.: EScala: modular event-driven object interactions in Scala. In: AOSD 2011, pp. 227–240. ACM (2011)
Hannemann, J., Kiczales, G.: Design pattern implementation in Java and AspectJ. In: OOPSLA 2002, pp. 161–173. ACM (2002)
Haupt, M., Schippers, H.: A machine model for aspect-oriented programming. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 501–524. Springer, Heidelberg (2007)
Havinga, W., Bergmans, L., Aksit, M.: A model for composable composition operators: expressing object and aspect compositions with first-class operators. In: AOSD 2010, pp. 145–156. ACM (2010)
Kamina, T., Aotani, T., Masuhara, H.: EventCJ: a context-oriented programming language with declarative event-based context transition. In: AOSD 2011, pp. 253–264. ACM (2011)
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Akşit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Hansen, K.A., Endoh, Y.: A fine-grained join point model for more reusable aspects. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 131–147. Springer, Heidelberg (2006)
Meyerovich, L.A., Guha, A., Baskin, J., Cooper, G.H., Greenberg, M., Bromfield, A., Krishnamurthi, S.: Flapjax: a programming language for Ajax applications. In: OOPSLA 2009, pp. 1–20. ACM (2009)
Microsoft Corporation. C# language specification
Microsoft Corporation. Messages and message queues
Núñez, A., Noyé, J., Gasiūnas, V.: Declarative definition of contexts with polymorphic events. In: COP 2009, pp. 2:1–2:6. ACM (2009)
Oracle Corporation. OpenJDK: Project Lambda, http://openjdk.java.net/projects/lambda/
Orleans, D.: Incremental programming with extensible decisions. In: AOSD 2002, pp. 56–64. ACM (2002)
Rajan, H., Leavens, G.T.: Ptolemy: A language with quantified, typed events. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 155–179. Springer, Heidelberg (2008)
Schippers, H., Janssens, D., Haupt, M., Hirschfeld, R.: Delegation-based semantics for modularizing crosscutting concerns. In: OOPSLA 2008, pp. 525–542. ACM (2008)
Smith, R.B., Ungar, D.: Programming as an experience: The inspiration for Self. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 303–330. Springer, Heidelberg (1995)
Sun Microsystems. Abstract Window Toolkit, http://java.sun.com/products/jdk/awt/
The AspectJ Project, http://www.eclipse.org/aspectj/
The Boost Project. Boost.Signals, http://www.boost.org/libs/signals/
The JastAdd Project. JastAddJ: The JastAdd Extensible Java Compiler, http://jastadd.org/web/jastaddj/
The Qt Project. Signals & Slots, http://qt-project.org/doc/signalsandslots
The SAX project. Simple API for XML, http://www.saxproject.org/
The Self project, http://selflanguage.org/
The X.Org project. Xlib in X window system, http://www.x.org/
Widom, J., Finkelstein, S.J.: Set-oriented production rules in relational database systems. In: SIGMOD 1990, pp. 259–270. ACM Press (1990)
Zhuang, Y., Chiba, S.: Applying DominoJ to GoF Design Patterns. Technical report, Dept. of Math. and Comp., Tokyo Institute of Technology (2011)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Zhuang, Y., Chiba, S. (2014). Method Slots: Supporting Methods, Events, and Advices by a Single Language Construct. In: Chiba, S., Tanter, É., Bodden, E., Maoz, S., Kienzle, J. (eds) Transactions on Aspect-Oriented Software Development XI. Lecture Notes in Computer Science, vol 8400. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-55099-7_3
Download citation
DOI: https://doi.org/10.1007/978-3-642-55099-7_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-55098-0
Online ISBN: 978-3-642-55099-7
eBook Packages: Computer ScienceComputer Science (R0)