| 
 | org.netbeans.modules.editor.mimelookup/1 1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Class2LayerFolder<T>
Provides further clasification of objects registered for a mime type. This
 interface is a hook into the implementation of the default
 MimeDataProvider that can be used to further specify where to
 look for instances of a certain class and how to create them.
 
The implementations of this interface should be registered among the services in the default lookup, for details look at META-INF/services registration.
The default MimeDataProvider allowes to register instances
 in a hierarchy of folders on the system filesystem (modules XML layers). The
 hierarchy starts with the Editors/ folder and then contains subfolders for
 each mime type that has some registered objects. So, for example there might
 be settings registered for the mime type identified by the following mime
 path 'text/x-jsp/text/x-java' and they would be located in the folder
 'Editors/text/x-jsp/text/x-java' on the system filesystem. For more details
 on the implementation of the default MimeDataProvider please see
 the SPI package description.
 
The implementations of this interface are used for determining the structure
 under the folder belonging to a given mime type. This interface allows to 
 tell the default MimeDataProvider that instances of a certain
 class are registered in a specific subfolder rather then under the folder
 belonging to the mime type. When looking up instances of such a class the
 default MimeDataProvider will not look in the mime type's folder,
 but in its subfolder, which name it will obtain by calling the implementation
 of this interface.
 
Therefore, for example instances of the FolderManager class
 can be registered in the 'Editors/text/x-java/foldManager' folder and they
 will be properly retrieved when calling
 MimeLookup.getLookup(MimePath.get("text/x-java")).lookup(FolderManager.class);.
| Method Summary | |
|---|---|
|  Class<T> | getClazz()Gets the class of the instances that are registered under the special subfolder. | 
|  InstanceProvider<T> | getInstanceProvider()Gets the InstanceProviderthat should be used for creating
 the registered instances. | 
|  String | getLayerFolderName()Gets the name of the subfolder where the instances are registered. | 
| Method Detail | 
|---|
Class<T> getClazz()
String getLayerFolderName()
Editors/text/x-java/<desired-layer-subfolder-name>.
InstanceProvider<T> getInstanceProvider()
InstanceProvider that should be used for creating
 the registered instances. This method can return null if
 there is no speacial InstanceProvider needed and the instances
 can be created in the standard way.
InstanceProvider capable of createing instances
 of the getClazz() class. Can return null.| 
 | org.netbeans.modules.editor.mimelookup/1 1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||