public class BeanWrap extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
BeanWrap.Proxy
Bean 代理接口(为BeanWrap 提供切换代码的能力)
|
| Constructor and Description |
|---|
BeanWrap(AppContext context,
Class<?> clz) |
BeanWrap(AppContext context,
Class<?> clz,
Constructor rawCtor,
Object[] rawCtorArgs) |
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 rawCtor,
Object[] rawCtorArgs) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
_new()
bean 新建对象
|
<T extends Annotation> |
annotationGet(Class<T> annClz) |
Annotation[] |
annotations()
注解
|
Class<?> |
clz()
bean 类
|
Constructor |
clzCtor()
bean 类构造函数
|
Object[] |
clzCtorArgs()
bean 类构造函数参数
|
Method |
clzDestroy()
bean 类注销函数
|
Method |
clzInit()
bean 类初始化函数
|
AppContext |
context() |
<T> T |
create() |
void |
done()
完成(完成后,不能再修改元信息)
|
protected Set<String> |
genericList() |
<T> T |
get()
bean 获取对象(可能被代理的)
|
<T> T |
get(boolean unproxied)
bean 获取对象(未代理的)
|
int |
index()
bean 序位
|
void |
indexSet(int index)
bean 序位设置
|
boolean |
isDoned()
包装已完成的(完成后,不能再修改元信息)
|
String |
name()
bean 名字
|
void |
nameSet(String name)
bean 名字设置
|
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 标签
|
void |
tagSet(String tag)
bean 标签设置
|
protected void |
tryInit(String initMethodName,
String destroyMethodName)
尝试初始化(仅对第一个实例有效)//保持与 LifecycleBean 相同策略
|
boolean |
typed()
bean 是否有类型化标识
|
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 rawCtor, Object[] rawCtorArgs)
public BeanWrap(AppContext context, Class<?> clz, Object raw, String name, boolean typed, String initMethodName, String destroyMethodName, Constructor rawCtor, Object[] rawCtorArgs)
public AppContext context()
public boolean isDoned()
public void done()
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 Constructor clzCtor()
public Object[] clzCtorArgs()
public <T> T raw(boolean unproxied)
public <T> T raw()
public void rawSet(Object raw)
public Class<?> rawClz()
public String name()
public void nameSet(String name)
public int index()
public void indexSet(int index)
public String tag()
public void tagSet(String tag)
public boolean typed()
public 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
ConstructionExceptionCopyright © 2025. All rights reserved.