Class ConditionalFactoryBean

  • All Implemented Interfaces:
    org.springframework.beans.factory.FactoryBean<Object>

    public class ConditionalFactoryBean
    extends Object
    implements org.springframework.beans.factory.FactoryBean<Object>
    Simple Spring factory bean that only returns an actual bean if the specified flag is true.
    Author:
    avasquez
    • Constructor Detail

      • ConditionalFactoryBean

        public ConditionalFactoryBean()
    • Method Detail

      • setActualBean

        public void setActualBean​(Object actualBean)
      • setFlag

        public void setFlag​(boolean flag)
      • getObject

        public Object getObject()
                         throws Exception
        Specified by:
        getObject in interface org.springframework.beans.factory.FactoryBean<Object>
        Throws:
        Exception
      • getObjectType

        public Class<?> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<Object>
      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface org.springframework.beans.factory.FactoryBean<Object>