Design Pattern - (Decorator|wrapper)

Card Puncher Data Processing


The decorator pattern, also known as a wrapper allows you to extend the run-time behaviour of an object. This process is known as decorating.

A (wrapper|decorator) class is any class which “wraps” or “encapsulates” the functionality of another class or component.

They have several advantages:

  • Protection against the change of code
  • Simplification of code


A wrapper has generally a wrapper interface that permits to unwrap (to get the wrapped object). Example: javase/9/docs/api/java/sql/Wrapper.html

Documentation / Reference

Discover More
Card Puncher Data Processing
Data Type - Boxing (Autoboxing|Autowrapping) and Primitive Wrapper

Boxing and Unboxing are the terms used to describe automatically wrapping a primitive type in a wrapper class and unwrapping it as necessary. This operation has the advantage to add basic method functions...
Card Puncher Data Processing
How to develop a Task for Ant?

How to develop a Task for Ant A class is registered as an AnT task if it's provide a method with the signature “public void execute()”. The class doesn't need to extends no superclass and...
Uml Composite Aggregation
Logical Data Modeling - Composition Relationship

composition is a containment relationship of physical type where the content entity is a part of a container entity This relationship is also known as: a whole/part relationship (ie whole/component)...
Card Puncher Data Processing
Object Type - Class

The type of an object is its class. See
Card Puncher Data Processing
Python - Class

in Python The difference with a standard class implementation is that in Python, Classes are objects because the class keyword will creates an object. Only a class object is capable of creating objects. A...
React - Higher Order Component (HOC)

Higher Order Component is a function that takes a component and returns a new component. It's not really a component, more a design pattern known as decorator. Redux’s connect Relay’s...

Share this page:
Follow us:
Task Runner