public abstract class BaseClassNameObjectGenerator extends Object
Constructor and Description |
---|
BaseClassNameObjectGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
addObjectAssembly(ObjectAssembly<?> objectAssembly) |
void |
addTypeCreator(TypeCreator<?> typeCreator) |
protected Class<?> |
getClazz(String className,
ClassLoader loader) |
protected Field |
getDeclaredFieldWithParent(Class<?> clazz,
String name) |
protected Object |
getInstanceBySpringBean(String bean) |
protected Object |
getIntanceByCreator(Class<?> clazz)
根据clazz从creators中获取其实例
|
protected ObjectAssembly<?> |
getObjectAssembly(Class<?> type) |
protected Object |
getObjectInstance(Class<?> clazz)
根据clazz获取对象 先从creator中获取,若找不到,则去springbean中获取
|
protected String |
getObjName(Class clazz) |
protected String |
getObjName(Object object) |
protected Object |
getPerpertyValue(String reallyName,
Context context) |
protected Object |
getPerpertyValue(String preName,
String objName,
String propertyName,
Context context) |
protected String |
getPreName(String preName,
String varName) |
protected String |
getReallyPropertyName(String preName,
String objName,
String propertyName) |
protected boolean |
implmentInterface(Class<?> clazz,
Class<?> interfaceClazz)
判断clazz是否实现了interfaceClazz
|
protected boolean |
isNull(String str) |
protected boolean |
isSimpleType(Class<?> clazz) |
void |
removeObjectAssembly(ObjectAssembly<?> objectAssembly) |
void |
removeTypeCreator(TypeCreator<?> typeCreator) |
public void addTypeCreator(TypeCreator<?> typeCreator)
public void removeTypeCreator(TypeCreator<?> typeCreator)
protected Object getIntanceByCreator(Class<?> clazz)
clazz
- protected ObjectAssembly<?> getObjectAssembly(Class<?> type)
protected Class<?> getClazz(String className, ClassLoader loader)
public void addObjectAssembly(ObjectAssembly<?> objectAssembly)
public void removeObjectAssembly(ObjectAssembly<?> objectAssembly)
protected String getReallyPropertyName(String preName, String objName, String propertyName)
protected boolean isSimpleType(Class<?> clazz)
protected Object getPerpertyValue(String preName, String objName, String propertyName, Context context)
protected boolean implmentInterface(Class<?> clazz, Class<?> interfaceClazz)
clazz
- interfaceClazz
- protected boolean isNull(String str)
protected Object getObjectInstance(Class<?> clazz)
clazz
- Copyright © 2006–2018 TinyGroup. All rights reserved.