org.scijava
Interface Instantiable<T>

Type Parameters:
T - The type of objects that can be created.
All Known Implementing Classes:
CommandInfo, PluginInfo

public interface Instantiable<T>

An interface declaring the ability to create objects.

Author:
Curtis Rueden

Method Summary
 T createInstance()
          Creates an object.
 String getClassName()
          Gets the fully qualified name of the Class of the objects that can be created.
 Class<? extends T> loadClass()
          Loads the class corresponding to the objects that are created by createInstance().
 

Method Detail

getClassName

String getClassName()
Gets the fully qualified name of the Class of the objects that can be created.


loadClass

Class<? extends T> loadClass()
                             throws InstantiableException
Loads the class corresponding to the objects that are created by createInstance().

Note that this class may not be precisely T.class but instead a subclass thereof.

Throws:
InstantiableException
See Also:
for an example of an {@code Instantiable} type that typically instantiates objects of a subtype of {@code T} rather than {@code T} itself.

createInstance

T createInstance()
                 throws InstantiableException
Creates an object.

Throws:
InstantiableException


Copyright © 2009–2014 SciJava. All rights reserved.