Class IBean
- java.lang.Object
-
- org.coliper.ibean.IBean
-
public class IBean extends Object
Used for creating new IBean instances.Sample:
SomeBeanType bean = IBean.newOf(SomeBeanType.class);
SomeBeanTypeneeds to be a valid IBean interface type. See alsoIBeanFactoryfor a explanation what interfaces build up a valid IBean type.
See here for a more general overview over IBean framework and some sample usages of classIBean.In many cases
IBeanis the main - and sometimes even only - class that needs to be used from the IBean framework. BasicallyIBeanis just a convenience class that is supposed to be used as a singleton and that holds a static instance of aIBeanFactorywhich does the actual job of bean creation.In most scenarios only one
IBeanFactoryis needed and this factory can be made available to rest of the code usingIBean.IBeancontains a preset default factory. If a customized factory should be used instead the static instance can be changed viasetFactory(IBeanFactory). See alsoProxyIBeanFactoryfor how to create customized factories.
The predefinedIBeanFactoryinsideIBeanhas following characteristics:- It is of type
ProxyIBeanFactory. - It supports bean interfaces using the default Java bean style
(
ClassicBeanStyle) - It supports all built in extension interfaces.
- It uses default
ToStringStyle.
- It is of type
-
-
Constructor Summary
Constructors Constructor Description IBean()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TnewOf(Class<T> beanType)static voidresetToDefaultFactory()static voidsetFactory(IBeanFactory newFactory)
-
-
-
Method Detail
-
newOf
public static <T> T newOf(Class<T> beanType)
-
setFactory
public static void setFactory(IBeanFactory newFactory)
-
resetToDefaultFactory
public static void resetToDefaultFactory()
-
-