Decorator design pattern. How I/O package is implemented in JAVA

Authors

  • Mihai Stefan Iolu Transilvania University of Brasov, Romania

Keywords:

design patterns, decorator, Java, polymorphism, object oriented programming

Abstract

Starting from the principles promoted by design patterns, we are going to show how I/O package is implemented in Java. The Decorator design pattern solves the problem in a very elegant way: it allows an object to be changed at runtime. This is possible with the help provided by this design pattern which also illustrates the way we can use composition instead of inheritance (one of the most important principles promoted by design patterns).

Published

2008-11-30

Issue

Section

INFORMATICS