public class StandardInjection<T> extends Object implements Resolution<T>
StandardInjectionProvider| Constructor and Description |
|---|
StandardInjection(Constructor<T> constructor,
List<Field> fields)
Constructs a standard injection object.
|
| Modifier and Type | Method and Description |
|---|---|
List<ObjectIdentifier> |
getDependencies()
Returns the dependencies that must be provided to create or retrieve the requested object.
|
T |
instantiateWith(Object... values)
Creates or retrieves an object with the given values as dependencies.
|
boolean |
isInstantiation()
Returns whether this resolution will instantiate an object or not.
|
public StandardInjection(Constructor<T> constructor, List<Field> fields)
constructor - the constructor to create objects withfields - the fields to inject after instantiationpublic List<ObjectIdentifier> getDependencies()
ResolutiongetDependencies in interface Resolution<T>Resolution.instantiateWith(java.lang.Object...)public T instantiateWith(Object... values)
ResolutionResolution.getDependencies() in size, order and type
(as given by ObjectIdentifier.getType().instantiateWith in interface Resolution<T>values - the required dependenciespublic boolean isInstantiation()
Resolutiontrue when the requested object has to be instantiated.isInstantiation in interface Resolution<T>Copyright © 2017. All rights reserved.