Class ChildIterableImpl<T>
- java.lang.Object
-
- org.glassfish.hk2.configuration.internal.ChildIterableImpl<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>,ChildIterable<T>
public class ChildIterableImpl<T> extends java.lang.Object implements ChildIterable<T>
-
-
Field Summary
Fields Modifier and Type Field Description private ChildFilterbaseFilterprivate java.lang.reflect.TypechildTypeprivate ServiceLocatorlocatorprivate java.lang.Stringprefixprivate java.lang.Stringseparator
-
Constructor Summary
Constructors Constructor Description ChildIterableImpl(ServiceLocator locator, java.lang.reflect.Type childType, java.lang.String prefix, java.lang.String separator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TbyKey(java.lang.String key)Gets the child with the given key.java.lang.Iterable<ServiceHandle<T>>handleIterator()Returns an iterator of the children's Service Handle, rather than their servicesjava.util.Iterator<T>iterator()
-
-
-
Field Detail
-
locator
private final ServiceLocator locator
-
childType
private final java.lang.reflect.Type childType
-
prefix
private final java.lang.String prefix
-
separator
private final java.lang.String separator
-
baseFilter
private final ChildFilter baseFilter
-
-
Constructor Detail
-
ChildIterableImpl
ChildIterableImpl(ServiceLocator locator, java.lang.reflect.Type childType, java.lang.String prefix, java.lang.String separator)
-
-
Method Detail
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<T>
-
byKey
public T byKey(java.lang.String key)
Description copied from interface:ChildIterableGets the child with the given key. The separator used to determine the full suffix to look for in the child is given by theChildInject.separator()field- Specified by:
byKeyin interfaceChildIterable<T>- Parameters:
key- The non-null key of the child to get- Returns:
- The child who has the given key
-
handleIterator
public java.lang.Iterable<ServiceHandle<T>> handleIterator()
Description copied from interface:ChildIterableReturns an iterator of the children's Service Handle, rather than their services- Specified by:
handleIteratorin interfaceChildIterable<T>- Returns:
- the iterator
-
-