@Module public final class InstanceImpl<T> extends java.lang.Object implements Instance<T>, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
T |
get()
Returns an instance of the selected bean
|
boolean |
isAmbiguous()
Test if there are multiple beans that match the instance.
|
boolean |
isUnsatisfied()
Test if there are any beans that match the instance.
|
java.util.Iterator<T> |
iterator() |
Instance<T> |
select(java.lang.annotation.Annotation... bindings)
Restricts the instance given a set of bindings
|
<U extends T> |
select(java.lang.Class<U> subtype,
java.lang.annotation.Annotation... bindings)
Restricts the instance to a subtype and bindings.
|
<U extends T> |
select(TypeLiteral<U> subtype,
java.lang.annotation.Annotation... bindings)
Restricts the instance to a subtype and bindings.
|
java.lang.String |
toString() |
public T get()
public Instance<T> select(java.lang.annotation.Annotation... bindings)
public <U extends T> Instance<U> select(java.lang.Class<U> subtype, java.lang.annotation.Annotation... bindings)
public <U extends T> Instance<U> select(TypeLiteral<U> subtype, java.lang.annotation.Annotation... bindings)
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public boolean isAmbiguous()
Instance
isAmbiguous
in interface Instance<T>
public boolean isUnsatisfied()
Instance
isUnsatisfied
in interface Instance<T>
public java.lang.String toString()
toString
in class java.lang.Object