|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.hk2.internal.IterableProviderImpl<T>
T
- The type for this providerpublic class IterableProviderImpl<T>
Method Summary | ||
---|---|---|
T |
get()
|
|
ServiceHandle<T> |
getHandle()
Rather than getting the service directly with get (in which case the returned service cannot be disposed of) this method will instead return a service handle for the current best service. |
|
int |
getSize()
Returns the size of the iterator that would be returned |
|
Iterable<ServiceHandle<T>> |
handleIterator()
This version of iterator returns an iterator of ServiceHandles rather than returning the services (which then have no way to be properly destroyed) |
|
Iterator<T> |
iterator()
|
|
IterableProvider<T> |
named(String name)
Returns an IterableProvider that is further qualified with the given name |
|
|
ofType(Type type)
Returns an IterableProvider that is of the given type. |
|
IterableProvider<T> |
qualifiedWith(Annotation... qualifiers)
A set of qualifiers to further restrict this iterator to. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public T get()
get
in interface javax.inject.Provider<T>
public ServiceHandle<T> getHandle()
IterableProvider
getHandle
in interface IterableProvider<T>
public Iterator<T> iterator()
iterator
in interface Iterable<T>
public int getSize()
IterableProvider
getSize
in interface IterableProvider<T>
public IterableProvider<T> named(String name)
IterableProvider
named
in interface IterableProvider<T>
name
- The value field of the Named annotation parameter. Must
not be null
public <U> IterableProvider<U> ofType(Type type)
IterableProvider
ofType
in interface IterableProvider<T>
type
- The type to restrict the returned iterator to
public IterableProvider<T> qualifiedWith(Annotation... qualifiers)
IterableProvider
qualifiedWith
in interface IterableProvider<T>
qualifiers
- The qualifiers to further restrict this iterator to
public Iterable<ServiceHandle<T>> handleIterator()
IterableProvider
handleIterator
in interface IterableProvider<T>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |