Function findDecorator

Find a decorator in decorator chain that implements Needle type.

Needle findDecorator(Needle, Haystack, Z, T) (
  T decorated
);

Find a decorator in decorator chain that implements Needle type.

Parameters

NameDescription
Needle the type searched decorator should implement
Haystack type of the chain of decorators through which to traverse
decorated top of decorator chain.

Returns

Decorator or null if not found.