Class IBean


  • public class IBean
    extends Object
    Used for creating new IBean instances.

    Sample:

     
         SomeBeanType bean = IBean.newOf(SomeBeanType.class);
     
     

    SomeBeanType needs to be a valid IBean interface type. See also IBeanFactory for 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 class IBean.

    In many cases IBean is the main - and sometimes even only - class that needs to be used from the IBean framework. Basically IBean is just a convenience class that is supposed to be used as a singleton and that holds a static instance of a IBeanFactory which does the actual job of bean creation.

    In most scenarios only one IBeanFactory is needed and this factory can be made available to rest of the code using IBean. IBean contains a preset default factory. If a customized factory should be used instead the static instance can be changed via setFactory(IBeanFactory). See also ProxyIBeanFactory for how to create customized factories.
    The predefined IBeanFactory inside IBean has following characteristics:

    • Constructor Detail

      • IBean

        public IBean()
    • Method Detail

      • newOf

        public static <T> T newOf​(Class<T> beanType)
      • setFactory

        public static void setFactory​(IBeanFactory newFactory)
      • resetToDefaultFactory

        public static void resetToDefaultFactory()