| Package | Description |
|---|---|
| net.lecousin.framework.injection |
Dependency injection.
|
| net.lecousin.framework.injection.xml |
Parsing injection configuration from XML.
|
| Modifier and Type | Field and Description |
|---|---|
protected ObjectMethod |
Singleton.destroy |
protected ObjectMethod |
Factory.initMethod |
| Modifier and Type | Method and Description |
|---|---|
static void |
Injection.call(InjectionContext ctx,
Object instance,
ObjectMethod method)
Call a method on an instance.
|
static Object |
Injection.create(InjectionContext ctx,
Class<?> clazz,
ObjectMethod initMethod,
List<ObjectAttribute> attrs)
Create an object to be injected.
|
static <T> T |
Injection.create(InjectionContext ctx,
Class<T> clazz,
List<ObjectValue> params,
ObjectMethod initMethod,
List<ObjectAttribute> attrs)
Create an object to be injected.
|
void |
InjectionContext.setObject(String id,
Class<?> type,
Object instance,
ObjectMethod destroy)
Add a singleton by id, equivalent to call
add(new Singleton(type, instance, id)). |
| Constructor and Description |
|---|
Factory(InjectionContext ctx,
Class<?> baseType,
Class<?> implType,
ObjectMethod initMethod,
List<ObjectAttribute> attributes,
String id)
Constructor.
|
Singleton(InjectionContext ctx,
Class<?> type,
Object instance,
String id,
ObjectMethod destroy)
Constructor.
|
SingletonOnDemand(InjectionContext ctx,
Class<?> type,
net.lecousin.framework.util.Provider<?> provider,
String id,
ObjectMethod destroy)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static ObjectMethod |
InjectionXmlParser01.readObjectMethod(InjectionContext ctx,
net.lecousin.framework.xml.XMLStreamReader xml,
net.lecousin.framework.application.Application app)
Read an object method from an XML stream.
|
Copyright © 2018. All rights reserved.