getOriginalDelegate

Recursively unwraps decorators to find the original (non-decorated) component. This method traverses the decorator chain until it finds an object that is not a decorator.

Return

the original non-decorated component

Example usage:

val decoratedComponent = SomeDecorator(SomeDecorator(originalComponent))
val original = decoratedComponent.getOriginalDelegate() // returns originalComponent

Parameters

C

the type of the component