@NoExtend public class ConfigurableObjectFactory<T> extends AbstractComponentFactory<T>
ComponentFactory
that handles all annotation related behavior including
ObjectFactory.getObject()
.LOCATION_KEY, ROOT_CONTAINER_NAME_KEY
ANNOTATIONS_PROPERTY_NAME
Constructor and Description |
---|
ConfigurableObjectFactory() |
Modifier and Type | Method and Description |
---|---|
T |
doGetObject()
Method to be implemented instead of
ObjectFactory.getObject() . |
void |
setCommonConfiguratorType(Class<ObjectFactoryCommonConfigurator> commonConfiguratorType)
injection method for the
ObjectFactoryCommonConfigurator of the object instance. |
void |
setFactory(ConfigurableInstanceFactory factory)
Sets a
ConfigurableInstanceFactory to create a do custom configuration for the object to be used at runtime. |
void |
setParameters(Map<String,Object> parameters) |
getObject
getAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotations
public T doGetObject() throws Exception
AbstractComponentFactory
ObjectFactory.getObject()
.doGetObject
in class AbstractComponentFactory<T>
Exception
- if any failure occurs building the objectpublic void setCommonConfiguratorType(Class<ObjectFactoryCommonConfigurator> commonConfiguratorType)
ObjectFactoryCommonConfigurator
of the object instance.commonConfiguratorType
- the common configuration type.public void setFactory(ConfigurableInstanceFactory factory)
ConfigurableInstanceFactory
to create a do custom configuration for the object to be used at runtime.factory
- the factory to create the runtime object instance.public void setParameters(Map<String,Object> parameters)
parameters
- set of component parameters map to this ObjectFactory
Copyright © 2018. All rights reserved.