类 BeanDefinitionUtils


  • public abstract class BeanDefinitionUtils
    extends java.lang.Object
    BeanDefinition Utilities class
    从以下版本开始:
    1.0.0
    作者:
    Mercy
    另请参阅:
    AbstractBeanDefinition, BeanDefinition.ROLE_APPLICATION, BeanDefinition.ROLE_INFRASTRUCTURE
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static java.util.Set<java.lang.String> findBeanNames​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, java.util.function.Predicate<org.springframework.beans.factory.config.BeanDefinition> predicate)  
      static java.util.Set<java.lang.String> findInfrastructureBeanNames​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)  
      static org.springframework.beans.factory.support.AbstractBeanDefinition genericBeanDefinition​(java.lang.Class<?> beanType)
      Build a generic instance of AbstractBeanDefinition
      static org.springframework.beans.factory.support.AbstractBeanDefinition genericBeanDefinition​(java.lang.Class<?> beanType, int role)
      Build a generic instance of AbstractBeanDefinition
      static org.springframework.beans.factory.support.AbstractBeanDefinition genericBeanDefinition​(java.lang.Class<?> beanType, int role, java.lang.Object[] constructorArguments)
      Build a generic instance of AbstractBeanDefinition
      static org.springframework.beans.factory.support.AbstractBeanDefinition genericBeanDefinition​(java.lang.Class<?> beanType, java.lang.Object... constructorArguments)
      Build a generic instance of AbstractBeanDefinition
      static boolean isInfrastructureBean​(org.springframework.beans.factory.config.BeanDefinition beanDefinition)  
      static java.lang.Class<?> resolveBeanType​(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition)  
      static java.lang.Class<?> resolveBeanType​(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition, java.lang.ClassLoader classLoader)  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • BeanDefinitionUtils

        public BeanDefinitionUtils()
    • 方法详细资料

      • genericBeanDefinition

        public static org.springframework.beans.factory.support.AbstractBeanDefinition genericBeanDefinition​(java.lang.Class<?> beanType)
        Build a generic instance of AbstractBeanDefinition
        参数:
        beanType - the type of bean
        返回:
        an instance of AbstractBeanDefinition
      • genericBeanDefinition

        public static org.springframework.beans.factory.support.AbstractBeanDefinition genericBeanDefinition​(java.lang.Class<?> beanType,
                                                                                                             java.lang.Object... constructorArguments)
        Build a generic instance of AbstractBeanDefinition
        参数:
        beanType - the type of bean
        constructorArguments - the arguments of Bean Classes' constructor
        返回:
        an instance of AbstractBeanDefinition
      • genericBeanDefinition

        public static org.springframework.beans.factory.support.AbstractBeanDefinition genericBeanDefinition​(java.lang.Class<?> beanType,
                                                                                                             int role)
        Build a generic instance of AbstractBeanDefinition
        参数:
        beanType - the type of bean
        role - the role of BeanDefinition
        返回:
        an instance of AbstractBeanDefinition
      • genericBeanDefinition

        public static org.springframework.beans.factory.support.AbstractBeanDefinition genericBeanDefinition​(java.lang.Class<?> beanType,
                                                                                                             int role,
                                                                                                             java.lang.Object[] constructorArguments)
        Build a generic instance of AbstractBeanDefinition
        参数:
        beanType - the type of bean
        role - the role of BeanDefinition
        constructorArguments - the arguments of Bean Classes' constructor
        返回:
        an instance of AbstractBeanDefinition
      • resolveBeanType

        public static java.lang.Class<?> resolveBeanType​(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition)
      • resolveBeanType

        public static java.lang.Class<?> resolveBeanType​(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition,
                                                         @Nullable
                                                         java.lang.ClassLoader classLoader)
      • findInfrastructureBeanNames

        public static java.util.Set<java.lang.String> findInfrastructureBeanNames​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
      • findBeanNames

        public static java.util.Set<java.lang.String> findBeanNames​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
                                                                    java.util.function.Predicate<org.springframework.beans.factory.config.BeanDefinition> predicate)
      • isInfrastructureBean

        public static boolean isInfrastructureBean​(org.springframework.beans.factory.config.BeanDefinition beanDefinition)