T
- Type class extending RegistryBean
public class ClassifiedInstancesObjectFactory<T extends RegistryBean> extends BaseObjectFactory<T>
ObjectFactory
interface for handing ClassifiedInstances
annotations.
Determines the actual bean type based on classifications on the RegistryObject
.Constructor and Description |
---|
ClassifiedInstancesObjectFactory() |
Modifier and Type | Method and Description |
---|---|
RegistryObject |
createRegistryObject(RegistryBean registryBean)
Creates
RegistryObject instance from the given RegistryBean based on configuration. |
static Classification |
findClassification(RegistryObject registryObject,
ClassifiedInstance classificationAnnotation,
PersistenceContext context)
Finds the classification specified with the
ClassifiedInstance annotation classification on the given registry object. |
createInstance, createRegistryBean, getBaseBeanClass, getContext
public RegistryObject createRegistryObject(RegistryBean registryBean) throws MappingException, JAXRException
RegistryObject
instance from the given RegistryBean
based on configuration.
Additionally adds classification based on the specified in the
ClassifiedInstances
annotation concept path.createRegistryObject
in interface ObjectFactory<T extends RegistryBean>
createRegistryObject
in class BaseObjectFactory<T extends RegistryBean>
registryBean
- The RegistryBean
objectRegistryObject
.MappingException
- If an error occurs while mapping the bean object to JAXRJAXRException
- If a JAXR error occurs while creating the registry objectpublic static Classification findClassification(RegistryObject registryObject, ClassifiedInstance classificationAnnotation, PersistenceContext context) throws JAXRException
ClassifiedInstance
annotation classification on the given registry object.registryObject
- The RegistryObject
to look for classificationclassificationAnnotation
- The ClassifiedInstance
annotation to look forcontext
- The PersistenceContext
instanceClassification
instance found or null
if not foundJAXRException
- If a JAXR error occurs while looking for the classification