MCPcopy Create free account
hub / github.com/amikey/java-design-patterns / App

Class App

decorator/src/main/java/com/iluwatar/decorator/App.java:13–29  ·  view source on GitHub ↗

Decorator pattern is more flexible alternative to subclassing. The decorator class implements the same interface as the target and uses composition to "decorate" calls to the target. Using decorator pattern it is possible to change class behavior during runtime, as the example shows.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected