MimeLocation
instead@Deprecated public interface Class2LayerFolder<T>
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 using ServiceProvider
.
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);
.
Modifier and Type | Method and Description |
---|---|
Class<T> |
getClazz()
Deprecated.
Gets the class of the instances that are registered under the special
subfolder.
|
InstanceProvider<T> |
getInstanceProvider()
Deprecated.
Gets the
InstanceProvider that should be used for creating
the registered instances. |
String |
getLayerFolderName()
Deprecated.
Gets the name of the subfolder where the instances are registered.
|
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 Class2LayerFolder.getClazz()
class. Can return null
.