站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

InstanceProvider (MIME Lookup API) - NetBeans API Javadoc (Current Development Version)

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

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.6

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.