public class ClassWrap extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
Class<?> |
clz() |
void |
fill(Object bean,
Function<String,String> data)
为实例填充数据
|
static ClassWrap |
get(Class<?> clz)
根据clz获取一个ClassWrap
|
Collection<FieldWrap> |
getAllFieldWraps()
获取所有非静态字段的包装(含超类)
|
Method[] |
getDeclaredMethods()
获取自己申明的Method
|
FieldWrap |
getFieldWrap(String field) |
Method[] |
getMethods()
获取所有公有的Method
|
Collection<FieldWrap> |
getStaticFieldWraps()
获取所有静态字段的包装(含超类,用于注入)
|
<T> T |
newBy(Function<String,String> data) |
<T> T |
newBy(Function<String,String> data,
Context ctx)
新建实例
|
<T> T |
newBy(Properties data)
新建实例
|
protected ClassWrap(Class<?> clz)
public Class<?> clz()
public Collection<FieldWrap> getAllFieldWraps()
public Collection<FieldWrap> getStaticFieldWraps()
public Method[] getDeclaredMethods()
public Method[] getMethods()
public <T> T newBy(Properties data)
data - 填充数据public <T> T newBy(Function<String,String> data, Context ctx) throws Exception
data - 填充数据ctx - 上下文ExceptionCopyright © 2024. All rights reserved.