injectFromParentOptional abstract method

  1. @protected
Object? injectFromParentOptional(
  1. Object token, [
  2. Object? orElse = throwIfNotFound
])

Injects and returns an object representing token from the parent.

Unlike inject, this only checks instances registered directly with the parent injector, not this injector, or further ancestors. This is equivalent to constructor parameters annotated with @Host.

Implementation

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