public class BeanWrap extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
BeanWrap.Proxy
Bean 代理接口(为BeanWrap 提供切换代码的能力)
|
static interface |
BeanWrap.Supplier
Bean 提供者
|
| 构造器和说明 |
|---|
BeanWrap(AppContext context,
Class<?> clz) |
BeanWrap(AppContext context,
Class<?> clz,
Constructor rawCon,
Object[] rawConArgs) |
BeanWrap(AppContext context,
Class<?> clz,
Object raw) |
BeanWrap(AppContext context,
Class<?> clz,
Object raw,
String name) |
BeanWrap(AppContext context,
Class<?> clz,
Object raw,
String name,
boolean typed) |
BeanWrap(AppContext context,
Class<?> clz,
Object raw,
String name,
boolean typed,
String initMethodName,
String destroyMethodName) |
BeanWrap(AppContext context,
Class<?> clz,
Object raw,
String name,
boolean typed,
String initMethodName,
String destroyMethodName,
Constructor rawCon,
Object[] rawConArgs) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Object |
_new()
bean 新建对象
|
<T extends Annotation> |
annotationGet(Class<T> annClz) |
Annotation[] |
annotations()
注解
|
Class<?> |
clz()
bean 类
|
Method |
clzDestroy()
bean 类注销函数
|
Method |
clzInit()
bean 类初始化函数
|
AppContext |
context() |
<T> T |
create() |
<T> T |
get()
bean 获取对象(可能被代理的)
|
<T> T |
get(boolean unproxied)
bean 获取对象(未代理的)
|
int |
index() |
protected void |
indexSet(int index) |
String |
name()
bean 标签
|
protected void |
nameSet(String name) |
BeanWrap.Proxy |
proxy() |
void |
proxySet(BeanWrap.Proxy proxy) |
<T> T |
raw()
bean 原始对象(可能被代理的)
|
<T> T |
raw(boolean unproxied)
bean 原始对象(未代理的)
|
Class<?> |
rawClz() |
void |
rawSet(Object raw) |
boolean |
remoting()
is remoting()?
|
void |
remotingSet(boolean remoting) |
boolean |
singleton()
是否为单例
|
void |
singletonSet(boolean singleton) |
String |
tag()
bean 标签
|
protected void |
tagSet(String tag) |
protected void |
tryInit(String initMethodName,
String destroyMethodName)
尝试初始化(仅对第一个实例有效)//保持与 LifecycleBean 相同策略
|
boolean |
typed()
bean 是否有类型化标识
|
protected void |
typedSet(boolean typed) |
public BeanWrap(AppContext context, Class<?> clz)
public BeanWrap(AppContext context, Class<?> clz, Object raw)
public BeanWrap(AppContext context, Class<?> clz, Object raw, String name)
public BeanWrap(AppContext context, Class<?> clz, Object raw, String name, boolean typed)
public BeanWrap(AppContext context, Class<?> clz, Object raw, String name, boolean typed, String initMethodName, String destroyMethodName)
public BeanWrap(AppContext context, Class<?> clz, Constructor rawCon, Object[] rawConArgs)
public BeanWrap(AppContext context, Class<?> clz, Object raw, String name, boolean typed, String initMethodName, String destroyMethodName, Constructor rawCon, Object[] rawConArgs)
public AppContext context()
public BeanWrap.Proxy proxy()
public void proxySet(BeanWrap.Proxy proxy)
public boolean singleton()
public void singletonSet(boolean singleton)
public boolean remoting()
public void remotingSet(boolean remoting)
public Class<?> clz()
public Method clzInit()
public Method clzDestroy()
public <T> T raw(boolean unproxied)
public <T> T raw()
public void rawSet(Object raw)
public Class<?> rawClz()
public String name()
protected void nameSet(String name)
public int index()
protected void indexSet(int index)
public String tag()
protected void tagSet(String tag)
public boolean typed()
protected void typedSet(boolean typed)
public Annotation[] annotations()
public <T extends Annotation> T annotationGet(Class<T> annClz)
public <T> T get()
public <T> T get(boolean unproxied)
unproxied - 未代理的public <T> T create()
protected Object _new() throws ConstructionException
Copyright © 2024. All rights reserved.