Class BeanLookup

  • All Implemented Interfaces:
    org.springframework.beans.factory.BeanFactory, org.springframework.beans.factory.ListableBeanFactory

    public class BeanLookup
    extends java.lang.Object
    implements org.springframework.beans.factory.ListableBeanFactory
    • Field Summary

      • Fields inherited from interface org.springframework.beans.factory.BeanFactory

        FACTORY_BEAN_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      BeanLookup()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsBean​(java.lang.String name)  
      boolean containsBeanDefinition​(java.lang.String name)  
      <A extends java.lang.annotation.Annotation>
      A
      findAnnotationOnBean​(java.lang.String name, java.lang.Class<A> annotationType)  
      java.lang.String[] getAliases​(java.lang.String name)  
      <T> T getBean​(java.lang.Class<T> requiredType)  
      <T> T getBean​(java.lang.Class<T> requiredType, java.lang.Object... objects)  
      java.lang.Object getBean​(java.lang.String name)  
      <T> T getBean​(java.lang.String name, java.lang.Class<T> requiredType)  
      java.lang.Object getBean​(java.lang.String name, java.lang.Object... objects)  
      int getBeanDefinitionCount()  
      java.lang.String[] getBeanDefinitionNames()  
      java.lang.String[] getBeanNamesForAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)  
      java.lang.String[] getBeanNamesForType​(java.lang.Class<?> type)  
      java.lang.String[] getBeanNamesForType​(java.lang.Class<?> type, boolean includePrototypes, boolean allowEagerInit)  
      java.lang.String[] getBeanNamesForType​(org.springframework.core.ResolvableType resolvableType)  
      java.lang.String[] getBeanNamesForType​(org.springframework.core.ResolvableType resolvableType, boolean includeNonSingletons, boolean allowEagerInit)  
      <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider​(java.lang.Class<T> requiredType)  
      <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider​(org.springframework.core.ResolvableType requiredType)  
      <T> java.util.Map<java.lang.String,​T> getBeansOfType​(java.lang.Class<T> type)  
      <T> java.util.Map<java.lang.String,​T> getBeansOfType​(java.lang.Class<T> type, boolean includePrototypes, boolean allowEagerInit)  
      java.util.Map<java.lang.String,​java.lang.Object> getBeansWithAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)  
      java.lang.Class<?> getType​(java.lang.String name)  
      java.lang.Class<?> getType​(java.lang.String name, boolean allowFactoryBeanInit)  
      boolean isPrototype​(java.lang.String name)  
      boolean isSingleton​(java.lang.String name)  
      boolean isTypeMatch​(java.lang.String name, java.lang.Class<?> typeToMatch)  
      boolean isTypeMatch​(java.lang.String name, org.springframework.core.ResolvableType resolvableType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BeanLookup

        public BeanLookup()
    • Method Detail

      • containsBeanDefinition

        public boolean containsBeanDefinition​(java.lang.String name)
        Specified by:
        containsBeanDefinition in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanDefinitionCount

        public int getBeanDefinitionCount()
        Specified by:
        getBeanDefinitionCount in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanDefinitionNames

        public java.lang.String[] getBeanDefinitionNames()
        Specified by:
        getBeanDefinitionNames in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanNamesForType

        public java.lang.String[] getBeanNamesForType​(java.lang.Class<?> type)
        Specified by:
        getBeanNamesForType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanNamesForType

        public java.lang.String[] getBeanNamesForType​(java.lang.Class<?> type,
                                                      boolean includePrototypes,
                                                      boolean allowEagerInit)
        Specified by:
        getBeanNamesForType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeansOfType

        public <T> java.util.Map<java.lang.String,​T> getBeansOfType​(java.lang.Class<T> type)
        Specified by:
        getBeansOfType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeansOfType

        public <T> java.util.Map<java.lang.String,​T> getBeansOfType​(java.lang.Class<T> type,
                                                                          boolean includePrototypes,
                                                                          boolean allowEagerInit)
        Specified by:
        getBeansOfType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanNamesForAnnotation

        public java.lang.String[] getBeanNamesForAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
        Specified by:
        getBeanNamesForAnnotation in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeansWithAnnotation

        public java.util.Map<java.lang.String,​java.lang.Object> getBeansWithAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
        Specified by:
        getBeansWithAnnotation in interface org.springframework.beans.factory.ListableBeanFactory
      • findAnnotationOnBean

        public <A extends java.lang.annotation.Annotation> A findAnnotationOnBean​(java.lang.String name,
                                                                                  java.lang.Class<A> annotationType)
        Specified by:
        findAnnotationOnBean in interface org.springframework.beans.factory.ListableBeanFactory
      • getBean

        public java.lang.Object getBean​(java.lang.String name)
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
      • getBean

        public <T> T getBean​(java.lang.String name,
                             java.lang.Class<T> requiredType)
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
      • getBean

        public <T> T getBean​(java.lang.Class<T> requiredType)
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
      • getBean

        public java.lang.Object getBean​(java.lang.String name,
                                        java.lang.Object... objects)
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
      • getBean

        public <T> T getBean​(java.lang.Class<T> requiredType,
                             java.lang.Object... objects)
        Specified by:
        getBean in interface org.springframework.beans.factory.BeanFactory
      • getBeanProvider

        public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider​(java.lang.Class<T> requiredType)
        Specified by:
        getBeanProvider in interface org.springframework.beans.factory.BeanFactory
      • getBeanProvider

        public <T> org.springframework.beans.factory.ObjectProvider<T> getBeanProvider​(org.springframework.core.ResolvableType requiredType)
        Specified by:
        getBeanProvider in interface org.springframework.beans.factory.BeanFactory
      • containsBean

        public boolean containsBean​(java.lang.String name)
        Specified by:
        containsBean in interface org.springframework.beans.factory.BeanFactory
      • isSingleton

        public boolean isSingleton​(java.lang.String name)
        Specified by:
        isSingleton in interface org.springframework.beans.factory.BeanFactory
      • isPrototype

        public boolean isPrototype​(java.lang.String name)
        Specified by:
        isPrototype in interface org.springframework.beans.factory.BeanFactory
      • isTypeMatch

        public boolean isTypeMatch​(java.lang.String name,
                                   java.lang.Class<?> typeToMatch)
        Specified by:
        isTypeMatch in interface org.springframework.beans.factory.BeanFactory
      • getType

        public java.lang.Class<?> getType​(java.lang.String name)
        Specified by:
        getType in interface org.springframework.beans.factory.BeanFactory
      • getType

        public java.lang.Class<?> getType​(java.lang.String name,
                                          boolean allowFactoryBeanInit)
                                   throws org.springframework.beans.factory.NoSuchBeanDefinitionException
        Specified by:
        getType in interface org.springframework.beans.factory.BeanFactory
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException
      • getAliases

        public java.lang.String[] getAliases​(java.lang.String name)
        Specified by:
        getAliases in interface org.springframework.beans.factory.BeanFactory
      • isTypeMatch

        public boolean isTypeMatch​(java.lang.String name,
                                   org.springframework.core.ResolvableType resolvableType)
        Specified by:
        isTypeMatch in interface org.springframework.beans.factory.BeanFactory
      • getBeanNamesForType

        public java.lang.String[] getBeanNamesForType​(org.springframework.core.ResolvableType resolvableType)
        Specified by:
        getBeanNamesForType in interface org.springframework.beans.factory.ListableBeanFactory
      • getBeanNamesForType

        public java.lang.String[] getBeanNamesForType​(org.springframework.core.ResolvableType resolvableType,
                                                      boolean includeNonSingletons,
                                                      boolean allowEagerInit)
        Specified by:
        getBeanNamesForType in interface org.springframework.beans.factory.ListableBeanFactory