Package aQute.bnd.osgi
Class PluginsContainer.PluginsSpliterator<T>
java.lang.Object
java.util.Spliterators.AbstractSpliterator<T>
aQute.bnd.osgi.PluginsContainer.PluginsSpliterator<T>
- All Implemented Interfaces:
Consumer<Object>
,Spliterator<T>
- Enclosing class:
- PluginsContainer
final class PluginsContainer.PluginsSpliterator<T>
extends Spliterators.AbstractSpliterator<T>
implements Consumer<Object>
A spliterator of plugins of the specified type ordered by the processor
hierarchy.
The supplied plugins may have duplicates if the same plugin is added into different processors in the hierarchy.
We supply the parent's plugins after this container's plugins so that
there is a hierarchical ordering where this container's plugins come
before the parent's plugins. Then PluginsContainer.getPlugin(Class)
will select a
matching plugin from this container, if it exists, versus one from the
parent.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T extends Object,
T_CONS extends Object, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Spliterator<T>
private Object
private Spliterator<T>
private final Spliterator<Object>
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
forEachRemaining
(Consumer<? super T> action) private Spliterator<T>
parent()
Defer creating the parent spliterator since we may not need it if the stream operation short circuits such as findFirst.boolean
tryAdvance
(Consumer<? super T> action) Methods inherited from class java.util.Spliterators.AbstractSpliterator
characteristics, estimateSize, trySplit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
type
-
self
-
provider
-
parent
-
plugin
-
-
Constructor Details
-
PluginsSpliterator
-
-
Method Details
-
parent
Defer creating the parent spliterator since we may not need it if the stream operation short circuits such as findFirst. -
tryAdvance
- Specified by:
tryAdvance
in interfaceSpliterator<T>
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceSpliterator<T>
-
accept
-