Package org.jboss.shrinkwrap.api
Interface ExtensionLoader
- All Known Implementing Classes:
ServiceExtensionLoader
public interface ExtensionLoader
ExtensionLoader
Describes a way for the
is set as the default strategy to load extensions.
Archive to load extensions. If an implementation is not set in the Domain's
Configuration,
invalid reference
ServiceExtensionLoader
- Version:
- $Revision: $
-
Method Summary
Modifier and TypeMethodDescription<T extends Assignable>
ExtensionLoaderaddOverride(Class<T> extensionClass, Class<? extends T> extensionImplClass) Add a 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-- 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 a 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
-