javax.enterprise.inject
Interface Instance<T>
- Type Parameters:
T
- the type of the event object
- All Superinterfaces:
- java.lang.Iterable<T>
public interface Instance<T>
- extends java.lang.Iterable<T>
An interface for looking up beans of a particular type.
- Author:
- Gavin King
Method Summary |
T |
get(java.lang.annotation.Annotation... bindings)
Get an instance of a bean of the specified type. |
boolean |
isAmbiguous()
|
boolean |
isUnsatisfied()
|
Instance<T> |
select(java.lang.annotation.Annotation... bindings)
|
|
select(java.lang.Class<U> subtype,
java.lang.annotation.Annotation... bindings)
|
|
select(TypeLiteral<U> subtype,
java.lang.annotation.Annotation... bindings)
|
Methods inherited from interface java.lang.Iterable |
iterator |
get
T get(java.lang.annotation.Annotation... bindings)
- Get an instance of a bean of the specified type.
Additional binding annotations may be specified at the injection point.
- Parameters:
bindings
- Additional binding types
- Returns:
- an instance of a bean of the specified type
- Throws:
java.lang.IllegalArgumentException
- if two instances of the same binding type are passed
java.lang.IllegalArgumentException
- if an instance of an annotation that is not a binding type is
passed
select
Instance<T> select(java.lang.annotation.Annotation... bindings)
select
<U extends T> Instance<U> select(java.lang.Class<U> subtype,
java.lang.annotation.Annotation... bindings)
select
<U extends T> Instance<U> select(TypeLiteral<U> subtype,
java.lang.annotation.Annotation... bindings)
isUnsatisfied
boolean isUnsatisfied()
isAmbiguous
boolean isAmbiguous()
Copyright © 2008-2009. All Rights Reserved.