use<T> abstract method

T use<T>(
  1. Hook<T> hook
)

Registers hook in this HookContext and returns its value.

This method can only be called during build of this HookContext, otherwise an exception will be thrown. After the first build, all subsequent builds must call this method in the same order, with Hooks of the same type.

Implementation

T use<T>(Hook<T> hook);