T - the type of the object to be created. The type parameter will be used to find out if the object implements
interfaces related to mule like lifecycle interfaces. If the type could not be known in advance and can only be know at
runtime then implement ObjectTypeProvider to inform the actual type.public interface ObjectFactory<T>
extends org.mule.runtime.api.component.Component
ComponentBuildingDefinition that use them.
Implementations of ObjectFactory can be annotated with @Inject at the field level to get dependency injection that can later be
used for the purpose of creating the object with getObject method. Objects created with the ObjectFactory will not have
dependency injection support.
ObjectFactories do not support any lifecycle method but the object created through getObject may implement lifecycle
interfaces.
| Modifier and Type | Method and Description |
|---|---|
T |
getObject() |
Copyright © 2022 MuleSoft, Inc.. All rights reserved.