Class ReflectionBeanProvider

    • Method Detail

      • close

        public void close()
        Description copied from interface: BeanProvider
        Release any internal resource created to support provided beans.

        Provided beans will not be usable after a call to this method.

        This may not release all resources that were allocated for each BeanHolder; BeanHolder.close() still needs to be called consistently for each created bean.

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface BeanProvider
        See Also:
        AutoCloseable.close()
      • forType

        public <T> BeanHolder<T> forType​(Class<T> typeReference)
        Description copied from interface: BeanProvider
        Provide a bean referenced by its type.
        Specified by:
        forType in interface BeanProvider
        Type Parameters:
        T - The expected return type.
        Parameters:
        typeReference - The type used as a reference to the bean to retrieve. Must be non-null.
        Returns:
        A BeanHolder containing the resolved bean.
      • forTypeNoClosingNecessary

        public <T> T forTypeNoClosingNecessary​(Class<T> typeReference)
      • forTypeAndName

        public <T> BeanHolder<T> forTypeAndName​(Class<T> typeReference,
                                                String implementationFullyQualifiedClassName)
        Description copied from interface: BeanProvider
        Provide a bean referenced by its type and name.
        Specified by:
        forTypeAndName in interface BeanProvider
        Type Parameters:
        T - The expected return type.
        Parameters:
        typeReference - The type used as a reference to the bean to retrieve. Must be non-null.
        implementationFullyQualifiedClassName - The name used as a reference to the bean to retrieve. Must be non-null and non-empty.
        Returns:
        A BeanHolder containing the resolved bean.
      • forTypeAndNameNoClosingNecessary

        public <T> T forTypeAndNameNoClosingNecessary​(Class<T> typeReference,
                                                      String implementationFullyQualifiedClassName)