public class PluginIndex extends SortedObjectIndex<PluginInfo<?>>
The plugin index is a special type of
that classifies each
PluginInfo object into a type hierarchy
compatible with its associated plugin type (i.e.,
PluginInfo.getPluginType()), rather than
NB: This type hierarchy will typically not include the plugin class
itself; for example, the
a plugin type of
Service, and hence will be
rationale is that to fully classify each plugin including its own class, said
class would need to be loaded, which SciJava makes an effort not to do until
the plugin is actually needed for the first time.
|Constructor and Description|
Constructs a new plugin index which uses a
Constructs a new plugin index which uses the given
|Modifier and Type||Method and Description|
Gets the exceptions which occurred during the last invocation of
Gets a list of registered plugins compatible with the given type.
Overrides the type by which the entries are indexed.
Removes the plugin from all type lists compatible with its plugin type.
addAll, addToList, contains, containsAll
add, add, add, addLater, clear, get, getAll, getBaseClass, getTypes, isEmpty, iterator, remove, remove, removeAll, removeFromList, retainAll, retrieveList, retrieveListsForType, size, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
DefaultPluginFinderto discover plugins.
public PluginIndex(PluginFinder pluginFinder)
public void discover()
public <PT extends SciJavaPlugin> List<PluginInfo<PT>> getPlugins(Class<PT> type)
This method is more specific than
ObjectIndex.get(Class) since that method
returns only a
List<PluginInfo<?>>, whereas this one is guaranteed
to return a
protected Class<?> getType(PluginInfo<?> info)
protected boolean remove(Object o, boolean batch)
NB: This behavior differs from the default
ObjectIndex behavior in that the
object's actual type hierarchy is not used for classification, but rather
the object is classified according to
Copyright © 2015–2019 SciJava. All rights reserved.