- java.lang.Object
-
- io.github.mmm.bean.impl.BeanFactoryManager
-
- All Implemented Interfaces:
BeanFactory
public final class BeanFactoryManager extends Object implements BeanFactory
Implementation ofBeanFactory
.
-
-
Field Summary
Fields Modifier and Type Field Description static BeanFactory
INSTANCE
The singleton instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <B extends WritableBean>
Bcreate(Class<B> type, boolean dynamic)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.mmm.bean.BeanFactory
create
-
-
-
-
Field Detail
-
INSTANCE
public static final BeanFactory INSTANCE
The singleton instance.
-
-
Method Detail
-
create
public <B extends WritableBean> B create(Class<B> type, boolean dynamic)
- Specified by:
create
in interfaceBeanFactory
- Type Parameters:
B
- type of theWritableBean
.- Parameters:
type
- theClass
reflecting theWritableBean
.dynamic
- thedynamic
flag.- Returns:
- a new instance of the
WritableBean
specified by the givenClass
. Iftype
is an interface, a dynamic proxy implementation is generated. Otherwise if a class is given it needs to extendBean
, be non-abstract and requires a non-arg constructor.
-
-