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 ChildFilter
baseFilter
private java.lang.reflect.Type
childType
private ServiceLocator
locator
private java.lang.String
prefix
private java.lang.String
separator
-
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 T
byKey(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:
iterator
in interfacejava.lang.Iterable<T>
-
byKey
public T byKey(java.lang.String key)
Description copied from interface:ChildIterable
Gets 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:
byKey
in 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:ChildIterable
Returns an iterator of the children's Service Handle, rather than their services- Specified by:
handleIterator
in interfaceChildIterable<T>
- Returns:
- the iterator
-
-