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,T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Spliterator<T> private Objectprivate 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 TypeMethodDescriptionvoidvoidforEachRemaining(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.booleantryAdvance(Consumer<? super T> action) Methods inherited from class java.util.Spliterators.AbstractSpliterator
characteristics, estimateSize, trySplitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
tryAdvancein interfaceSpliterator<T>
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceSpliterator<T>
-
accept
-