Class BeanFactoryObjectFactory

java.lang.Object
com.github.robtimus.obfuscation.spring.BeanFactoryObjectFactory
All Implemented Interfaces:
ObjectFactory

public class BeanFactoryObjectFactory extends Object implements ObjectFactory
An ObjectFactory that is backed by an AutowireCapableBeanFactory. It will try to lookup a bean of the given type first. If none is available, a new instance is created using the backing bean factory. This allows created instances to have autowired fields of their own.
Author:
Rob Spoor
  • Constructor Details

    • BeanFactoryObjectFactory

      public BeanFactoryObjectFactory(AutowireCapableBeanFactory beanFactory)
      Creates a new object factory.
      Parameters:
      beanFactory - The backing bean factory.
      Throws:
      NullPointerException - If the given bean factory is null.
  • Method Details