# Easy Augmentation with Decorators in Kotlin

DevFeed: [Easy Augmentation with Decorators in Kotlin](<https://devfeed.tech/articles/easy-augmentation-with-decorators-in-kotlin-25652.md>)

Original publisher: [Read original article](<https://adambennett.dev/2019/06/easy-augmentation-with-decorators-in-kotlin/>)

Published: 2019-06-01T07:40:53Z

Content type: tutorial

Language: en

Sources: [Posts on Adam Bennett](<https://devfeed.tech/sources/posts-on-adam-bennett.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Logging](<https://devfeed.tech/topics/logging.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [android](<https://devfeed.tech/tags/android.md>), [blockchain](<https://devfeed.tech/tags/blockchain.md>), [blog](<https://devfeed.tech/tags/blog.md>), [career](<https://devfeed.tech/tags/career.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [finance](<https://devfeed.tech/tags/finance.md>), [functional](<https://devfeed.tech/tags/functional.md>), [growth](<https://devfeed.tech/tags/growth.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [java](<https://devfeed.tech/tags/java.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [logging](<https://devfeed.tech/tags/logging.md>), [money](<https://devfeed.tech/tags/money.md>), [opinions](<https://devfeed.tech/tags/opinions.md>), [software](<https://devfeed.tech/tags/software.md>), [software-design](<https://devfeed.tech/tags/software-design.md>), [startups](<https://devfeed.tech/tags/startups.md>), [thoughts](<https://devfeed.tech/tags/thoughts.md>), [training](<https://devfeed.tech/tags/training.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

A Kotlin tutorial demonstrates how to augment an existing class with logging without modifying the original implementation. It uses an interface, a wrapper class, and Kotlin class delegation to forward most methods while overriding selected behavior.

## Source excerpt

Often in software design you may wish that a particular class had more functionality than it currently offers, or that you could tweak its behaviour slightly. In this contrived example, we're going to add some logging to an existing class, but we've decided not to do it in the target class directly. There can be a few reasons for this: