|
ShrinkWrap Implementation Base 1.0.0-cr-2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.shrinkwrap.impl.base.ServiceExtensionLoader
public class ServiceExtensionLoader
ServiceExtensionLoader
This class is the default strategy to load extensions when an instance of ExtensionLoader is not provided to
the ConfigurationBuilder and the ConfigurationBuilder.build() method is invoked. If the
ConfigurationBuilder doesn't provide any ClassLoader, ConfigurationBuilder.build() defaults
to a one-element collection holding the TCCL. The classLoaders are used to find the
provider-configuration file for the extension to be loaded in META-INF/services/. This provider-configuration file is
used to make an instance of the SPI implementation and cached in cache.
| Constructor Summary | |
|---|---|
ServiceExtensionLoader(Iterable<ClassLoader> classLoaders)
Creates a new instance, using the specified ClassLoaders to create extensions |
|
| Method Summary | ||
|---|---|---|
|
addOverride(Class<T> extensionClass,
Class<? extends T> extensionImplClass)
|
|
|
getArchiveFormatFromExtensionMapping(Class<T> type)
|
|
|
getExtensionFromExtensionMapping(Class<T> type)
|
|
boolean |
isOverriden(Class<?> extensionClass)
Check to see if a specific extension interface is beeing overloaded |
|
|
load(Class<T> extensionClass,
Archive<?> baseArchive)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceExtensionLoader(Iterable<ClassLoader> classLoaders)
throws IllegalArgumentException
ClassLoaders to create extensions
classLoaders -
IllegalArgumentException - If the ClassLoader is not specified| Method Detail |
|---|
public <T extends Assignable> T load(Class<T> extensionClass,
Archive<?> baseArchive)
throws UnknownExtensionTypeException
load in interface ExtensionLoaderUnknownExtensionTypeExceptionExtensionLoader.load(java.lang.Class, org.jboss.shrinkwrap.api.Archive)
public <T extends Assignable> ServiceExtensionLoader addOverride(Class<T> extensionClass,
Class<? extends T> extensionImplClass)
addOverride in interface ExtensionLoaderExtensionLoader.addOverride(java.lang.Class, java.lang.Class)public <T extends Assignable> String getExtensionFromExtensionMapping(Class<T> type)
getExtensionFromExtensionMapping in interface ExtensionLoaderExtensionLoader.getExtensionFromExtensionMapping(java.lang.Class)public <T extends Archive<T>> ArchiveFormat getArchiveFormatFromExtensionMapping(Class<T> type)
getArchiveFormatFromExtensionMapping in interface ExtensionLoaderExtensionLoader.getArchiveFormatFromExtensionMapping(java.lang.Class)public boolean isOverriden(Class<?> extensionClass)
extensionClass - The ExtensionType interface class
|
ShrinkWrap Implementation Base 1.0.0-cr-2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||