injectFromSelfOptional method

  1. @protected
Object injectFromSelfOptional(
  1. Object token,
  2. [Object orElse = throwIfNotFound]
)
@protected, inherited

Injects and returns an object representing token from this injector.

Unlike inject, this only checks this itself, not the parent or the ancestry of injectors. This is equivalent to constructor parameters annotated with @Self.

Implementation

@protected
Object injectFromSelfOptional(
  Object token, [
  Object orElse = throwIfNotFound,
]);