Class AutowiredPropertyFactoryBean<T>

java.lang.Object
net.solarnetwork.support.AutowiredPropertyFactoryBean<T>
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<T>
Direct Known Subclasses:
SimpMessageSendingOperationsFactoryBean

public class AutowiredPropertyFactoryBean<T> extends Object implements org.springframework.beans.factory.FactoryBean<T>
FactoryBean where the exposed object is actually configured via auto-wiring on setObject(Object). This is to facilitate exposing services with known bean IDs, for situations where a bean might be injected into the application context with an ID generated at runtime.
Version:
1.0
Author:
matt
  • Constructor Details

    • AutowiredPropertyFactoryBean

      public AutowiredPropertyFactoryBean(Class<T> objectType)
      Construct with the object type.
      Parameters:
      objectType - The object type.
  • Method Details

    • getObjectType

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

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

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

      @Autowired public void setObject(T object)
      Set the factory object.
      Parameters:
      object - the object to set