Class AnnotationConfigBeanProvider
java.lang.Object
cool.scx.bean.provider.AnnotationConfigBeanProvider
- All Implemented Interfaces:
BeanProvider
注解配置的 BeanProvider, 根据 class 进行反射
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> 表示 getBean() 返回的对象类型static voidcheckClass(Class<?> beanClass) static ConstructorInfofindPreferredConstructor(Class<?> beanClass) 查找构造函数getBean(BeanFactory beanFactory) 获取 Beanstatic ObjectresolveConstructorArgument(BeanFactory beanFactory, ParameterInfo parameter) 解析构造函数参数boolean表示 getBean() 是否始终返回同一实例
-
Constructor Details
-
AnnotationConfigBeanProvider
public AnnotationConfigBeanProvider(Class<?> beanClass) throws IllegalBeanClassException, NoSuchConstructorException, NoUniqueConstructorException
-
-
Method Details
-
checkClass
- Throws:
IllegalBeanClassException
-
findPreferredConstructor
public static ConstructorInfo findPreferredConstructor(Class<?> beanClass) throws NoSuchConstructorException, NoUniqueConstructorException 查找构造函数 -
resolveConstructorArgument
解析构造函数参数 -
beanClass
Description copied from interface:BeanProvider表示 getBean() 返回的对象类型- Specified by:
beanClassin interfaceBeanProvider
-
getBean
Description copied from interface:BeanProvider获取 Bean- Specified by:
getBeanin interfaceBeanProvider
-
singleton
public boolean singleton()Description copied from interface:BeanProvider表示 getBean() 是否始终返回同一实例- Specified by:
singletonin interfaceBeanProvider
-