org.netbeans.modules.editor.mimelookup/1 1.11.1

org.netbeans.spi.editor.mimelookup
Interface InstanceProvider<T>


public interface InstanceProvider<T>

Provider of the instance of the given class.
The provider gets a list of files which it transfers into one instance of the class for which it's declared.

For example there can be an instance provider of actions for the editor popup. The file object names of the actions declared in the layer can be of two forms:


The instance provider translates all the file objects to actions which it returns as a collection in some sort of collection-like class e.g.
 interface PopupActions {

     List<Action> getActions();

 }


Method Summary
 T createInstance(List<FileObject> fileObjectList)
          Create an instance of the class for which this instance provider is declared in Class2LayerFolder.
 

Method Detail

createInstance

T createInstance(List<FileObject> fileObjectList)
Create an instance of the class for which this instance provider is declared in Class2LayerFolder.

Parameters:
fileObjectList - non-null list of the file objects collected from the particular layer folder and possibly the inherited folders.
Returns:
non-null instance of the class for which this instance provider is declared. The list of the file objects should be translated to that instance so typically the instance contains some kind of the collection.

org.netbeans.modules.editor.mimelookup/1 1.11.1

Built on August 26 2009.  |  Portions Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.