T - The type of this IterableProviderpublic interface IterableProvider<T> extends Provider<T>, java.lang.Iterable<T>
The iterator returned will be in ranked order (with DescriptorRank as primary key, largest rank first and ServiceID as secondary key, smallest id first)
| Modifier and Type | Method and Description |
|---|---|
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
|
java.lang.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)
|
IterableProvider<T> |
named(java.lang.String name)
Returns an IterableProvider that is further qualified
with the given name
|
<U> IterableProvider<U> |
ofType(java.lang.reflect.Type type)
Returns an IterableProvider that is of the given type.
|
IterableProvider<T> |
qualifiedWith(java.lang.annotation.Annotation... qualifiers)
A set of qualifiers to further restrict this iterator to.
|
ServiceHandle<T> getHandle()
int getSize()
IterableProvider<T> named(java.lang.String name)
name - The value field of the Named annotation parameter. Must
not be null<U> IterableProvider<U> ofType(java.lang.reflect.Type type)
type - The type to restrict the returned iterator toIterableProvider<T> qualifiedWith(java.lang.annotation.Annotation... qualifiers)
qualifiers - The qualifiers to further restrict this iterator tojava.lang.Iterable<ServiceHandle<T>> handleIterator()
Copyright © 2013 Oracle Corporation. All Rights Reserved.