|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Instance<T>
Factory to create instances of a bean.
package example;
import javax.enterprise.inject.*;
import javax.servlet.*;
public class MyServlet extends GenericServlet {
@Obtains
@Instance<MyBean> _beanFactory;
public void service(ServletRequest req, ServletResponse res)
{
MyBean bean = _beanFactory.get();
}
}
javax.event.Event
Method Summary | ||
---|---|---|
boolean |
isAmbiguous()
Test if there are multiple beans that match the instance. |
|
boolean |
isUnsatisfied()
Test if there are any beans that match the instance. |
|
Instance<T> |
select(java.lang.annotation.Annotation... qualifiers)
Restricts the instance given a set of qualifiers |
|
|
select(java.lang.Class<U> subtype,
java.lang.annotation.Annotation... qualifiers)
Restricts the instance to a subtype and bindings. |
|
|
select(TypeLiteral<U> subtype,
java.lang.annotation.Annotation... qualifiers)
Restricts the instance to a subtype and bindings. |
Methods inherited from interface javax.inject.Provider |
---|
get |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
Instance<T> select(java.lang.annotation.Annotation... qualifiers)
<U extends T> Instance<U> select(java.lang.Class<U> subtype, java.lang.annotation.Annotation... qualifiers)
<U extends T> Instance<U> select(TypeLiteral<U> subtype, java.lang.annotation.Annotation... qualifiers)
boolean isUnsatisfied()
boolean isAmbiguous()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |