| 构造器和说明 |
|---|
BeanUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected static Set<String> |
doGetBeanNames(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
Class<?> beanType)
Get Bean names from
ConfigurableListableBeanFactory by type |
static String[] |
getBeanNames(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
Class<?> beanClass)
Get Bean Names from
ConfigurableListableBeanFactory by type. |
static String[] |
getBeanNames(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
Class<?> beanClass,
boolean includingAncestors)
Get Bean Names from
ConfigurableListableBeanFactory by type. |
static String[] |
getBeanNames(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<?> beanClass)
Get Bean Names from
ListableBeanFactory by type. |
static String[] |
getBeanNames(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<?> beanClass,
boolean includingAncestors)
Get Bean Names from
ListableBeanFactory by type. |
static <T> T |
getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<T> beanClass)
Get Optional Bean by
Class. |
static <T> T |
getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<T> beanClass,
boolean includingAncestors)
Get Optional Bean by
Class including ancestors(BeanFactory). |
static <T> List<T> |
getSortedBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<T> type)
Get all sorted Beans of
ListableBeanFactory in specified bean type. |
static boolean |
isBeanPresent(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<?> beanClass)
Is Bean Present or not?
|
static boolean |
isBeanPresent(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<?> beanClass,
boolean includingAncestors)
Is Bean Present or not?
|
static boolean |
isBeanPresent(org.springframework.beans.factory.ListableBeanFactory beanFactory,
String beanClassName)
Is Bean Present or not?
|
static boolean |
isBeanPresent(org.springframework.beans.factory.ListableBeanFactory beanFactory,
String beanClassName,
boolean includingAncestors)
Is Bean Present or not?
|
static Class<?> |
resolveBeanType(String beanClassName,
ClassLoader classLoader)
Resolve Bean Type
|
static <T> Map<String,T> |
sort(Map<String,T> beansMap)
Sort Beans
Map via AnnotationAwareOrderComparator.sort(List) rule |
public static boolean isBeanPresent(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<?> beanClass)
beanFactory - ListableBeanFactorybeanClass - The Class of Beantrue , or falsepublic static boolean isBeanPresent(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<?> beanClass,
boolean includingAncestors)
beanFactory - ListableBeanFactorybeanClass - The Class of BeanincludingAncestors - including ancestors or nottrue , or falsepublic static boolean isBeanPresent(org.springframework.beans.factory.ListableBeanFactory beanFactory,
String beanClassName,
boolean includingAncestors)
beanFactory - ListableBeanFactorybeanClassName - The name of Class of BeanincludingAncestors - including ancestors or nottrue , or falsepublic static boolean isBeanPresent(org.springframework.beans.factory.ListableBeanFactory beanFactory,
String beanClassName)
beanFactory - ListableBeanFactorybeanClassName - The name of Class of Beantrue , or falsepublic static String[] getBeanNames(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, Class<?> beanClass)
ConfigurableListableBeanFactory by type.beanFactory - ConfigurableListableBeanFactorybeanClass - The Class of Beanpublic static String[] getBeanNames(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, Class<?> beanClass, boolean includingAncestors)
ConfigurableListableBeanFactory by type.beanFactory - ConfigurableListableBeanFactorybeanClass - The Class of BeanincludingAncestors - including ancestors or notpublic static String[] getBeanNames(org.springframework.beans.factory.ListableBeanFactory beanFactory, Class<?> beanClass)
ListableBeanFactory by type.beanFactory - ListableBeanFactorybeanClass - The Class of Beanpublic static String[] getBeanNames(org.springframework.beans.factory.ListableBeanFactory beanFactory, Class<?> beanClass, boolean includingAncestors)
ListableBeanFactory by type.beanFactory - ListableBeanFactorybeanClass - The Class of BeanincludingAncestors - including ancestors or notprotected static Set<String> doGetBeanNames(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, Class<?> beanType)
ConfigurableListableBeanFactory by typebeanFactory - ConfigurableListableBeanFactorybeanType - The type of Beanpublic static Class<?> resolveBeanType(String beanClassName, ClassLoader classLoader)
beanClassName - the class name of BeanclassLoader - ClassLoadernull.public static <T> T getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<T> beanClass,
boolean includingAncestors)
throws org.springframework.beans.BeansException
Class including ancestors(BeanFactory).T - The Class of BeanbeanFactory - ListableBeanFactorybeanClass - The Class of BeanincludingAncestors - including ancestors or notnull.org.springframework.beans.factory.NoUniqueBeanDefinitionException - if more than one bean of the given type was foundorg.springframework.beans.BeansExceptionBeanFactoryUtils.beanOfTypeIncludingAncestors(ListableBeanFactory, Class)public static <T> T getOptionalBean(org.springframework.beans.factory.ListableBeanFactory beanFactory,
Class<T> beanClass)
throws org.springframework.beans.BeansException
Class.T - The Class of BeanbeanFactory - ListableBeanFactorybeanClass - The Class of Beannull.org.springframework.beans.factory.NoUniqueBeanDefinitionException - if more than one bean of the given type was foundorg.springframework.beans.BeansExceptionpublic static <T> List<T> getSortedBeans(org.springframework.beans.factory.ListableBeanFactory beanFactory, Class<T> type)
ListableBeanFactory in specified bean type.T - bean typebeanFactory - ListableBeanFactorytype - bean typeCopyright © 2019. All rights reserved.