|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scijava.AbstractBasicDetails
org.scijava.AbstractUIDetails
org.scijava.plugin.PluginInfo<PT>
PT
- The type of plugin described by this metadata. See
SciJavaPlugin
for a list of common plugin types.public class PluginInfo<PT extends SciJavaPlugin>
A collection of metadata about a particular plugin.
For performance reasons, the metadata is populated without actually loading
the plugin class, by reading from an efficient binary cache (see
DefaultPluginService
for details). As such, we can
very quickly build a complex structure containing all available plugins
without waiting for the Java class loader.
Plugin
,
PluginService
Field Summary |
---|
Fields inherited from interface org.scijava.UIDetails |
---|
APPLICATION_MENU_ROOT |
Constructor Summary | |
---|---|
|
PluginInfo(Class<? extends PT> pluginClass,
Class<PT> pluginType)
Creates a new plugin metadata object. |
|
PluginInfo(Class<? extends PT> pluginClass,
Class<PT> pluginType,
Plugin annotation)
Creates a new plugin metadata object. |
protected |
PluginInfo(String className,
Class<? extends PT> pluginClass,
Class<PT> pluginType,
Plugin annotation,
ClassLoader classLoader)
|
|
PluginInfo(String className,
Class<PT> pluginType)
Creates a new plugin metadata object. |
|
PluginInfo(String className,
Class<PT> pluginType,
Plugin annotation)
Creates a new plugin metadata object. |
|
PluginInfo(String className,
Class<PT> pluginType,
Plugin annotation,
ClassLoader classLoader)
Creates a new plugin metadata object. |
Method Summary | |
---|---|
PT |
createInstance()
Creates an object. |
Plugin |
getAnnotation()
Gets the associated @ Plugin annotation. |
String |
getClassName()
Gets the fully qualified name of the Class of the objects that can
be created. |
URL |
getIconURL()
Gets the URL corresponding to the icon resource path. |
Class<? extends PT> |
getPluginClass()
Obtains the Class of the item objects, if that class has already
been loaded. |
Class<PT> |
getPluginType()
Gets the type of plugin described by the metadata. |
boolean |
inject(Object o)
Injects the metadata into the given object. |
Class<? extends PT> |
loadClass()
Loads the class corresponding to the objects that are created by Instantiable.createInstance() . |
void |
setPluginClass(Class<? extends PT> pluginClass)
Explicitly sets the Class of the item objects. |
void |
setPluginType(Class<PT> pluginType)
Sets the type of plugin described by the metadata. |
String |
toString()
|
Methods inherited from class org.scijava.AbstractUIDetails |
---|
compareTo, getIconPath, getMenuPath, getMenuRoot, getPriority, getSelectionGroup, getTitle, isEnabled, isSelectable, isSelected, isVisible, setEnabled, setIconPath, setMenuPath, setMenuRoot, setPriority, setSelectable, setSelected, setSelectionGroup, setVisible |
Methods inherited from class org.scijava.AbstractBasicDetails |
---|
get, getDescription, getLabel, getName, is, set, setDescription, setLabel, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.scijava.BasicDetails |
---|
get, getDescription, getLabel, getName, is, set, setDescription, setLabel, setName |
Constructor Detail |
---|
public PluginInfo(String className, Class<PT> pluginType)
className
- The name of the class, which must implement
SciJavaPlugin
.pluginType
- The type of plugin described by this metadata.
See SciJavaPlugin
for a list of common plugin types.public PluginInfo(String className, Class<PT> pluginType, Plugin annotation)
className
- The name of the class, which must implement
SciJavaPlugin
.pluginType
- The type of plugin described by this metadata.
See SciJavaPlugin
for a list of common plugin types.annotation
- The @Plugin
annotation to associate with this
metadata object.public PluginInfo(String className, Class<PT> pluginType, Plugin annotation, ClassLoader classLoader)
className
- The name of the class, which must implement
SciJavaPlugin
.pluginType
- The type of plugin described by this metadata.
See SciJavaPlugin
for a list of common plugin types.annotation
- The @Plugin
annotation to associate with this
metadata object.classLoader
- The ClassLoader
to use when loading the class
via loadClass()
, or null to use the current thread's
context class loader by default.public PluginInfo(Class<? extends PT> pluginClass, Class<PT> pluginType)
pluginClass
- The plugin class, which must implement
SciJavaPlugin
.pluginType
- The type of plugin described by this metadata.
See SciJavaPlugin
for a list of common plugin types.public PluginInfo(Class<? extends PT> pluginClass, Class<PT> pluginType, Plugin annotation)
pluginClass
- The plugin class, which must implement
SciJavaPlugin
.pluginType
- The type of plugin described by this metadata.
See SciJavaPlugin
for a list of common plugin types.annotation
- The @Plugin
annotation to associate with this
metadata object.protected PluginInfo(String className, Class<? extends PT> pluginClass, Class<PT> pluginType, Plugin annotation, ClassLoader classLoader)
Method Detail |
---|
public void setPluginClass(Class<? extends PT> pluginClass)
Class
of the item objects.
This is useful if your class is produced by something other than the system classloader.
public Class<? extends PT> getPluginClass()
Class
of the item objects, if that class has already
been loaded.
Class
, or null if it has not yet been loaded by
loadClass()
.public void setPluginType(Class<PT> pluginType)
for a list of common plugin types.
public Class<PT> getPluginType()
for a list of common plugin types.
public Plugin getAnnotation()
Plugin
annotation.
public URL getIconURL() throws InstantiableException
InstantiableException
AbstractUIDetails.getIconPath()
public boolean inject(Object o)
HasPluginInfo
interface.
o
- The object to which the metadata should be assigned.
public String toString()
toString
in class AbstractUIDetails
public String getClassName()
Instantiable
Class
of the objects that can
be created.
getClassName
in interface Instantiable<PT extends SciJavaPlugin>
public Class<? extends PT> loadClass() throws InstantiableException
Instantiable
Instantiable.createInstance()
.
Note that this class may not be precisely T.class
but instead a
subclass thereof.
loadClass
in interface Instantiable<PT extends SciJavaPlugin>
InstantiableException
for an example of an
{@code Instantiable} type that typically instantiates objects of a
subtype of {@code T} rather than {@code T} itself.
public PT createInstance() throws InstantiableException
Instantiable
createInstance
in interface Instantiable<PT extends SciJavaPlugin>
InstantiableException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |