Class BeanFactoryManager

java.lang.Object
io.github.mmm.bean.impl.BeanFactoryManager
All Implemented Interfaces:
BeanFactory

public final class BeanFactoryManager extends Object implements BeanFactory
Implementation of BeanFactory.
  • Field Details

    • INSTANCE

      public static final BeanFactory INSTANCE
      The singleton instance.
  • Method Details

    • create

      public <B extends WritableBean> B create(Class<B> type, BeanClass beanClass)
      Specified by:
      create in interface BeanFactory
      Type Parameters:
      B - type of the WritableBean.
      Parameters:
      type - the Class reflecting the WritableBean.
      beanClass - the BeanClass that has to correspond to the Class given by parameter type.
      Returns:
      a new instance of the WritableBean specified by the given Class. If type is an interface, a dynamic proxy implementation is generated. Otherwise if a class is given it needs to extend Bean, be non-abstract and requires a non-arg constructor.