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

Class2LayerFolder (NetBeans Editor MIME Lookup) - NetBeans API Javadoc 5.5.1

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

org.netbeans.spi.editor.mimelookup
Interface Class2LayerFolder


public interface Class2LayerFolder

Provides a mapping of class to specific subfolder of the xml layer filesystem. Instances of this class should be registed to default lookup by META-INF/services registration. Using this mapping one can achieve the convenient way of using MimeLookup i.e.

MimeLookup.getMimeLookup("text/x-java").lookup(FoldManager.class);

Using this, the registered instances of FoldManager will be retrieved from the folder with path "Editors/text/x-java/foldManager" provided that FoldManager.class is registered to a subfolder "foldManager" via Class2LayerFolder registration.


Method Summary
 Class getClazz()
          Gets class of the looked-up object, i.e.
 InstanceProvider getInstanceProvider()
          Get an instance provider if necessary or return null if the default behavior which returns all the collected instances as the result is desired.
 String getLayerFolderName()
          Gets layer subfolder name, where the class should be found.
 

Method Detail

getClazz

Class getClazz()
Gets class of the looked-up object, i.e. FoldManager.class

Returns:
class of the looked-up object.

getLayerFolderName

String getLayerFolderName()
Gets layer subfolder name, where the class should be found. Folder should be located in the appropriate mime type path, i.e.

Editors/text/x-java/<desired-layer-subfolder-name>
or
Editors/<desired-layer-folder-name> for mime type insensitive objects

Returns:
layer folder name

getInstanceProvider

InstanceProvider getInstanceProvider()
Get an instance provider if necessary or return null if the default behavior which returns all the collected instances as the result is desired.

Returns:
instance provider returning instances of getClazz() or null if all the declared fileobjects should be instantiated and returned as lookup result.

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

Built on March 26 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.