public class ObjectFactoryClassRepository extends Object
FactoryBean from an
ObjectFactory. This is done because we need dependency injection and instrospection done over the ObjectFactory
without the user knowing about it.
The created FactoryBean is the one that receives the injection of fields declared by
the ObjectFactory. It also provides information about the instance type that is creating since it's used to know the
order in which beans must be initialised based on the dependencies between them.
| Constructor and Description |
|---|
ObjectFactoryClassRepository() |
| Modifier and Type | Method and Description |
|---|---|
Class<org.mule.runtime.dsl.api.component.ObjectFactory> |
getObjectFactoryClass(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition componentBuildingDefinition,
Class objectFactoryType,
Class createdObjectType,
Supplier<Boolean> isLazyInitFunction,
Optional<Consumer<Object>> instancePostCreationFunctionOptional)
|
public Class<org.mule.runtime.dsl.api.component.ObjectFactory> getObjectFactoryClass(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition componentBuildingDefinition, Class objectFactoryType, Class createdObjectType, Supplier<Boolean> isLazyInitFunction, Optional<Consumer<Object>> instancePostCreationFunctionOptional)
Class for the ObjectFactory defined by the objectFactoryType parameter. Once acquired the
Class instance should not be reused for another ComponentBuildingDefinition.componentBuildingDefinition - the definition on how to build the componentobjectFactoryType - the ObjectFactory of the componentcreatedObjectType - the type of object created by the ObjectFactoryisLazyInitFunction - function that defines if the object created by the component can be created lazilyinstancePostCreationFunctionOptional - function to do custom processing of the created instance by the ObjectFactory.
When there's no need for post processing this value must be Optional.empty()FactoryBean class to be used by spring for the provided configuration.Copyright © 2003–2019 MuleSoft, Inc.. All rights reserved.