com.easyjf.container.impl
类 BeanCreatorUtil
java.lang.Object
com.easyjf.container.impl.BeanCreatorUtil
public class BeanCreatorUtil
- extends java.lang.Object
负责创建Bean的工具类,在创建的过程中解决构造子注入
- 作者:
- 大峡
| 从类 java.lang.Object 继承的方法 |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanCreatorUtil
public BeanCreatorUtil()
argumentsTypeDiffWith
public static boolean argumentsTypeDiffWith(java.lang.Class[] args,
java.lang.Class[] vs)
getArgumentsValueType
public static java.lang.Class[] getArgumentsValueType(int max,
ConstructorArgumentValue[] cvs)
initBean
public static java.lang.Object initBean(BeanDefinition beanDefinition,
Container container)
isCreateOnStart
public static boolean isCreateOnStart(BeanDefinition definition)
- 判断一个Bean是否需要在容器加载的时候加载,不以&开头,lazy为flase,scope为singleton或application的Bean将会在容器初始化的时候加载
- 参数:
definition -
- 返回:
- 若该定义的bean需要在启动时创建,则返回true,否则返回false
resolverConstructor
public static java.lang.reflect.Constructor resolverConstructor(java.lang.Class type,
ConstructorArguments args)
sortArgumentsValue
public static void sortArgumentsValue(ConstructorArgumentValue[] args)
sortConstructors
public static void sortConstructors(java.lang.reflect.Constructor[] constructors)
- Sort the given constructors, preferring public constructors and "greedy"
ones with a maximum of arguments. The result will contain public
constructors first, with decreasing number of arguments, then non-public
constructors, again with decreasing number of arguments.
- 参数:
constructors - the constructor array to sort