Package javax.enterprise.inject.spi
Class CDI<T>
- java.lang.Object
-
- javax.enterprise.inject.spi.CDI<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,Instance<T>
,javax.inject.Provider<T>
public abstract class CDI<T> extends java.lang.Object implements Instance<T>
Static helper class to access the
TODO not yet implemented!BeanManager
Usage:
BeanManager bm = CDI.current().getBeanManager();
- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description CDI()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CDI<java.lang.Object>
current()
abstract BeanManager
getBeanManager()
static void
setCDIProvider(CDIProvider provider)
A container or an application can set this manually.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.Instance
destroy, isAmbiguous, isUnsatisfied, select, select, select
-
-
-
-
Field Detail
-
INSTANCE
private static volatile CDI INSTANCE
-
-
Method Detail
-
current
public static CDI<java.lang.Object> current()
-
setCDIProvider
public static void setCDIProvider(CDIProvider provider)
A container or an application can set this manually. If not we will use the
TODO: clarify if this is per 'application' or general?ServiceLoader
and use the first service we find.- Parameters:
provider
- to use
-
getBeanManager
public abstract BeanManager getBeanManager()
-
-