|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.plugin.core.PluginRegistrySupport<T,S>
org.springframework.plugin.core.SimplePluginRegistry<T,S>
org.springframework.plugin.core.OrderAwarePluginRegistry<T,S>
public class OrderAwarePluginRegistry<T extends Plugin<S>,S>
PluginRegistry implementation that be made aware of a certain ordering of Plugins. By default it
orders Plugins by regarding Ordered interface or
Order annotation. To alter ordering behaviour use one of the factory
methods accepting a Comparator as parameter.
| Constructor Summary | |
|---|---|
protected |
OrderAwarePluginRegistry(List<? extends T> plugins,
Comparator<? super T> comparator)
Creates a new OrderAwarePluginRegistry with the given Plugins and Comparator. |
| Method Summary | ||
|---|---|---|
static
|
create()
Creates a new OrderAwarePluginRegistry using the #DEFAULT_COMPARATOR. |
|
static
|
create(Comparator<? super T> comparator)
Creates a new OrderAwarePluginRegistry using the given Comparator for ordering contained
Plugins. |
|
static
|
create(List<? extends T> plugins)
Creates a new OrderAwarePluginRegistry with the given plugins. |
|
static
|
create(List<? extends T> plugins,
Comparator<? super T> comparator)
Creates a new OrderAwarePluginRegistry with the given plugins. |
|
static
|
createReverse(List<? extends T> plugins)
Creates a new OrderAwarePluginRegistry with the given plugins and the order of the plugins reverted. |
|
protected List<T> |
initialize(List<T> plugins)
Callback to initialize the plugin List. |
|
OrderAwarePluginRegistry<T,S> |
reverse()
Returns a new OrderAwarePluginRegistry with the order of the plugins reverted. |
|
| Methods inherited from class org.springframework.plugin.core.SimplePluginRegistry |
|---|
contains, countPlugins, getPluginFor, getPluginFor, getPluginFor, getPlugins, getPluginsFor, getPluginsFor, getPluginsFor, hasPluginFor |
| Methods inherited from class org.springframework.plugin.core.PluginRegistrySupport |
|---|
iterator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected OrderAwarePluginRegistry(List<? extends T> plugins,
Comparator<? super T> comparator)
OrderAwarePluginRegistry with the given Plugins and Comparator.
plugins - the Plugins to be contained in the registry or null if the registry shall be
empty initally.comparator - the Comparator to be used for ordering the Plugins or null if the
#DEFAULT_COMPARATOR shall be used.| Method Detail |
|---|
public static <S,T extends Plugin<S>> OrderAwarePluginRegistry<T,S> create()
OrderAwarePluginRegistry using the #DEFAULT_COMPARATOR.
T - S -
public static <S,T extends Plugin<S>> OrderAwarePluginRegistry<T,S> create(Comparator<? super T> comparator)
OrderAwarePluginRegistry using the given Comparator for ordering contained
Plugins.
T - S -
public static <S,T extends Plugin<S>> OrderAwarePluginRegistry<T,S> create(List<? extends T> plugins)
OrderAwarePluginRegistry with the given plugins.
S - T - plugins -
public static <S,T extends Plugin<S>> OrderAwarePluginRegistry<T,S> createReverse(List<? extends T> plugins)
OrderAwarePluginRegistry with the given plugins and the order of the plugins reverted.
S - T - plugins -
public static <S,T extends Plugin<S>> OrderAwarePluginRegistry<T,S> create(List<? extends T> plugins,
Comparator<? super T> comparator)
OrderAwarePluginRegistry with the given plugins.
S - T - plugins -
protected List<T> initialize(List<T> plugins)
PluginRegistrySupportList. Will create a defensive copy of the List to potentially
unwrap a List proxy. Will filter null values from the source list as well.
initialize in class PluginRegistrySupport<T extends Plugin<S>,S>plugins - must not be null.
public OrderAwarePluginRegistry<T,S> reverse()
OrderAwarePluginRegistry with the order of the plugins reverted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||