T - the annotation typepublic class Injector<T extends Annotation> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Injector.Target<T>
The Target class describes the target injection point.
|
| Constructor and Description |
|---|
Injector(Converter converter,
Function<Injector.Target<T>,Object> domain,
Class<T> annotation)
Create a new Injector
|
Injector(Function<Injector.Target<T>,Object> domain,
Class<T> annotation)
Create a new Injector with a default converter
|
| Modifier and Type | Method and Description |
|---|---|
void |
inject(Object target)
Inject an object.
|
<F> F |
newInstance(Class<F> type) |
public Injector(Converter converter, Function<Injector.Target<T>,Object> domain, Class<T> annotation)
converter - the converter to use for conversionsdomain - the domain function that retrieves valuesannotation - the annotation that triggers a call to the domainpublic void inject(Object target) throws Exception
target - the target object to injectExceptionCopyright © 2021. All rights reserved.