Package org.datanucleus
Class CDIHandler
java.lang.Object
org.datanucleus.CDIHandler
Handles the integration of "javax.enterprise.inject" CDI API.
Note that this is the only class referring to CDI classes so that it is usable in environments without CDI present.
TODO Make this thread-safe
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) javax.enterprise.inject.spi.BeanManager
(package private) Set
<javax.enterprise.context.spi.CreationalContext> Cache of InjectionTarget keyed by the object that they created. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
<T> T
Method to instantiate an object of the specified type with injected dependencies.
-
Field Details
-
beanManager
javax.enterprise.inject.spi.BeanManager beanManager -
creationalContexts
Set<javax.enterprise.context.spi.CreationalContext> creationalContexts -
injectionTargets
Cache of InjectionTarget keyed by the object that they created.
-
-
Constructor Details
-
CDIHandler
-
-
Method Details
-
createObjectWithInjectedDependencies
Method to instantiate an object of the specified type with injected dependencies.- Type Parameters:
T
- Type of the object- Parameters:
cls
- The type to instantiate- Returns:
- The instance
-
close
public void close()
-