| Author |
Decorator pattern
|
Priya Bindra
Ranch Hand
Joined: Sep 22, 2009
Posts: 51
|
|
I dont understand how decorator pattern is different from sublassing.
Wiki says that: "The decorator pattern is an alternative to subclassing. Subclassing adds behaviour at compile time, and the change affects all instances of the original class; decorating can provide new behaviour at runtime for individual objects."
Can someone explain.
|
 |
Siva Masilamani
Ranch Hand
Joined: Sep 19, 2008
Posts: 377
|
|
This link should help you
webpage
|
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
|
 |
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1303
|
|
|
EJB deployment descriptor adds beans behavior at run-time using decorator design pattern. Inheritance adds behavior during compile time.
|
 |
 |
|
|
subject: Decorator pattern
|
|
|