Package | Description |
---|---|
org.nutz.ioc |
Ioc 容器
|
org.nutz.ioc.impl |
Modifier and Type | Method and Description |
---|---|
<T> T |
Ioc.get(Class<T> type)
从容器中获取一个对象。这个对象的名称会根据传入的类型按如下规则决定
如果定义了注解 '@InjectName',采用其值为注入名
否则采用类型 simpleName 的首字母小写形式作为注入名
|
<T> T |
Ioc.get(Class<T> type,
String name)
从容器中获取一个对象。同时会触发对象的 fetch 事件。如果第一次构建对象 则会先触发对象 create 事件
|
boolean |
Ioc.has(String name) |
Modifier and Type | Method and Description |
---|---|
<T> T |
NutIoc.get(Class<T> type) |
<T> T |
NutIoc.get(Class<T> type,
String name,
IocContext context) |
Copyright © 2017. All rights reserved.