A Framework to Translate UML Class Generalization into Java Code

  • Pedro Sánchez
  • Patricio Letelier
  • Juan A. Pastor
  • Juan A. Ortega
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2425)


The concept of generalization used during analysis when building a class diagram has a close relationship with the notion of inheritance included in object-oriented programming languages. However, from the point of view of programming, inheritance is a useful mechanism but not especially conceived to implement the generalization specified in analysis. Thus, generalization should be treated suitably in order to obtain sounded design and code from analysis specifications. In addition, it is known that it does not exist concensus about the interpretation and use of inheritance and each programming language provides its particular vision. Hence, when moving from analysis to design and/or implementation (and normally without using a formal approach) the generalization relationships are prone to misinterpretation. OASIS is a formal approach to specify object-oriented conceptual models. In OASIS generalization is included as a language construct that allows specifying generalization patterns with precise semantic and sintaxis. Although OASIS is a textual formal language, the main aspects of one OASIS specification can be mapped and represented using the UML notation, in particular generalization relationships among classes. In this paper we present OASIS generalization patterns and we show how they can be implemented in Java. We also propose other ways to carry out this implementation.


Parent Class Design Pattern Static Classification Java Code Java Modeling Language 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Object Managment Group. OMG Unified Modeling Language Specification (v. 1.4), 2001Google Scholar
  2. 2.
    Taivalsaari A. On the Notion of Inheritance. ACM Comp. Surv., Vol. 28(3) (1996) 438–478CrossRefGoogle Scholar
  3. 3.
    Al-Ahamad W. and Steegmans E. Integrating Extension and Specialization Inheritance. Journal of Object-Oriented Programming, December (2001)Google Scholar
  4. 4.
    Wegner P. and Zdonik S. Inheritance as an Incremental Modification Mechanism or What Like Is and Isn’t Like. In Proc. of the 7th. European Conference on Object Oriented Programming, LNCS 322, ECOOP’88 (1988) 55–77Google Scholar
  5. 5.
    Letelier P., Ramos I., Sánchez P. and Pastor O. OASIS 3.0: A Formal Approach for the Object Oriented Conceptual Modeling. Technical University of Valencia, ISBN 84-7721-663-0, Spain, (in Spanish) (1998)
  6. 6.
    Wieringa R., Jonge W. and Spruit P. Using Dynamic Classes and Role Classes to Model Object Migration. Theory and Practice of Object Systems, Vol. 1(1) (1995) 61–83Google Scholar
  7. 7.
    Letelier P., Sánchez P., Troyano J. and Crespo Y., Specialization in Conceptual Modeling: A rigurous use of Inheritance. Actas del 3er Workshop Iberoamericano de Ingeniería de Requisitos y Ambientes Software (IDEAS), Cancún, Méjico (in Spanish) (2000)Google Scholar
  8. 8.
    Sánchez P., Letelier P. and Ramos I. Animating Formal Specifications with Inheritance in a DL-Framework. Requirements Eng. Journal, Vol.4, Springer-Verlag (2000) 198–209Google Scholar
  9. 9.
    Liskov B., Guttag J. Program Development in Java: Abstraction, Specification and Object-Oriented Design. Addison-Wesley (2001)Google Scholar
  10. 10.
    Leavens G., Rustan K., Leino M., Poll E., Ruby C. and Jacobs B. JML: notations and tools supporting detailed design in Java. In OOPSLA’ 00 Companion, Minneapolis, Minnesota, Copyright ACM (2000) 105–106Google Scholar
  11. 11.
    Bäumer D., Riehle D., Siberski W. and Wulf M. Role Object. In Pattern Languages of Program Design 4. Edited by Neil Harrison, et Al. Addison-Wesley, Chapter 2 (2000) 15–32Google Scholar
  12. 12.
    Martin J. and Odell J. Object-Oriented Methods: A Foundation. Prentice Hall (1998)Google Scholar
  13. 13.
    Fowler M. and Kendall S. UML Destilled: Applying the Standard Object Modeling Language. Addison-Wesley (1997)Google Scholar
  14. 14.
    Gamma E., Helm R., Johnson R. and Vlissides J. Design Patterns: Elements of Reusable Object-Oriented Software. Professional Computing Series. Addison-Wesley, MA (1994)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2002

Authors and Affiliations

  • Pedro Sánchez
    • 1
  • Patricio Letelier
    • 2
  • Juan A. Pastor
    • 1
  • Juan A. Ortega
    • 3
  1. 1.Universidad Politécnica de CartagenaSpain
  2. 2.Universidad Politécnica de ValenciaSpain
  3. 3.Universidad de SevillaSpain

Personalised recommendations