Class JdkBeanFactory

    • Constructor Detail

      • JdkBeanFactory

        public JdkBeanFactory()
    • Method Detail

      • construct

        public <T> T construct​(Class<T> beanClass,
                               Object... properties)
                        throws Exception
        Description copied from interface: BeanFactory
        Constructs an instance of a bean.

        Constructs and injects property values, and invokes any PostConstruct initializers.

        Specified by:
        construct in interface BeanFactory
        Type Parameters:
        T - type of bean to create
        Parameters:
        beanClass - a bean class (must have a no-arg constructor)
        properties - key-value pairs; each pair must correspond to a JavaBeans-style property of beanClass
        Returns:
        bean instance
        Throws:
        Exception
      • construct

        public <T> T construct​(Class<T> beanClass,
                               Map properties)
                        throws Exception
        Description copied from interface: BeanFactory
        Constructs an instance of a bean.

        Constructs and injects property values, and invokes any PostConstruct initializers.

        Specified by:
        construct in interface BeanFactory
        Type Parameters:
        T - type of bean to create
        Parameters:
        beanClass - a bean class (must have a no-arg constructor)
        properties - map of property values; each key in the map must correspond to a JavaBeans-style property of beanClass
        Returns:
        bean instance
        Throws:
        Exception