public abstract class PluginRegistrySupport<T extends Plugin<S>,S> extends Object implements PluginRegistry<T,S>, Iterable<T>
PluginRegistry
implementations. Implements an initialization mechanism triggered on forst
invocation of getPlugins()
.Constructor and Description |
---|
PluginRegistrySupport(List<? extends T> plugins)
Creates a new
PluginRegistrySupport instance using the given plugins. |
Modifier and Type | Method and Description |
---|---|
List<T> |
getPlugins()
Returns all registered plugins.
|
protected List<T> |
initialize(List<T> plugins)
Callback to initialize the plugin
List . |
Iterator<T> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, countPlugins, getPluginFor, getPluginFor, getPluginFor, getPluginsFor, getPluginsFor, getPluginsFor, hasPluginFor
forEach, spliterator
public PluginRegistrySupport(List<? extends T> plugins)
PluginRegistrySupport
instance using the given plugins.plugins
- must not be null.public List<T> getPlugins()
getPlugins
in interface PluginRegistry<T extends Plugin<S>,S>
protected List<T> initialize(List<T> plugins)
List
. Will create a defensive copy of the List
to potentially
unwrap a List
proxy. Will filter null values from the source list as well.plugins
- must not be null.Copyright © 2008-2014–2015 Pivotal, Inc.. All rights reserved.