@Singleton public class ExtensionList<T> extends Object implements Iterable<T>
ExtensionFinder.
@Inject
ExtensionList<Foo> foos;
void someFunction(){
for (Foo f : foos) {
...
}
}
| Constructor and Description |
|---|
ExtensionList(Class<T> type) |
ExtensionList(com.google.inject.TypeLiteral<T> type) |
| Modifier and Type | Method and Description |
|---|---|
Iterator<T> |
iterator()
If
ExtensionList is injected, then it can be used as
Iterable to list up extensions that are found in that injector. |
List<T> |
list(com.google.inject.Injector injector)
Returns all the extension implementations in the specified injector.
|
@Inject public ExtensionList(com.google.inject.TypeLiteral<T> type)
public Iterator<T> iterator()
ExtensionList is injected, then it can be used as
Iterable to list up extensions that are found in that injector.Copyright © 2011-2013. All Rights Reserved.