Interface Injector
- All Known Subinterfaces:
Context
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Resolves and injects values into fields, methods and/or constructors annotated with
Inject.- Since:
- Oct-2024
- Author:
- brian.oliver
-
Method Summary
Modifier and TypeMethodDescription<T> Tinject(T injectable) Resolves and injects values into the specified injectable object.
-
Method Details
-
inject
Resolves and injects values into the specified injectable object.When injection fails an
InjectionExceptionis thrown. For specific types of injection failures, an appropriate subclass ofInjectionException, likeUnsatisfiedDependencyException, will be thrown.- Type Parameters:
T- the type of object being injected- Parameters:
injectable- the object in which values are to be injected- Returns:
- the injected object allowing for fluent-style method calls
- Throws:
InjectionException- when injection fails
-