public class ClassWrap extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ClassWrap(Class<?> clz) |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
clz() |
void |
fill(Object bean,
Function<String,String> data)
为实例填充数据
|
Method |
findPublicMethod(String name,
Class<?>... parameterTypes) |
Collection<Method> |
findPublicMethods() |
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 Collection<Method> findPublicMethods()
public Method findPublicMethod(String name, Class<?>... parameterTypes) throws NoSuchMethodException
NoSuchMethodExceptionpublic <T> T newBy(Properties data)
data - 填充数据public <T> T newBy(Function<String,String> data, Context ctx) throws Exception
data - 填充数据ctx - 上下文ExceptionCopyright © 2025. All rights reserved.