Interface ExtensionLoader
public interface ExtensionLoader
ExtensionLoader
Describes a way for the Archive to load extensions. If an implementation is not set in the Domain's
Configuration, a default strategy will be used to load extensions.
- Version:
- $Revision: $
- Author:
- Aslak Knutsen, Ken Gullaksen
-
Method Summary
Modifier and TypeMethodDescription<T extends Assignable>
ExtensionLoaderaddOverride(Class<T> extensionClass, Class<? extends T> extensionImplClass) Add an Override to the normal Extension loading.<T extends Archive<T>>
ArchiveFormatgetArchiveFormatFromExtensionMapping(Class<T> extensionClass) Gets theArchiveFormatfor the given type from the extensionMapping<T extends Assignable>
StringgetExtensionFromExtensionMapping(Class<T> extensionClass) Gets the extension for the given type from the extensionMapping<T extends Assignable>
TLoad a Extension.
-
Method Details
-
load
Load a Extension.- Type Parameters:
T- The type of extension to be loaded.- Parameters:
extensionClass- The Extension interfacebaseArchive- The base archive to use- Returns:
- a
-
addOverride
<T extends Assignable> ExtensionLoader addOverride(Class<T> extensionClass, Class<? extends T> extensionImplClass) Add an Override to the normal Extension loading.If a specific class is found to be overridden, the class will not be loaded using the normal strategy.
- Type Parameters:
T- The type of Extension- Parameters:
extensionClass- The Extension interface classextensionImplClass- The Extension implementation class- Returns:
- this ExtensionLoader
-
getExtensionFromExtensionMapping
Gets the extension for the given type from the extensionMapping- Type Parameters:
T- The type of Extension- Parameters:
extensionClass- The Extension interface class- Returns:
- the filename extension
-
getArchiveFormatFromExtensionMapping
Gets theArchiveFormatfor the given type from the extensionMapping- Type Parameters:
T- The type of Extension- Parameters:
extensionClass- The Extension interface class- Returns:
- the archive format
-