|
ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1 | |||||||||
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 ClassLoader s to
create extensions |
Method Summary | ||
---|---|---|
|
addOverride(Class<T> extensionClass,
Class<? extends T> extensionImplClass)
Add a Override to the normal Extension loading. |
|
|
getArchiveFormatFromExtensionMapping(Class<T> type)
Gets the ArchiveFormat for the given type from the extensionMapping |
|
|
getExtensionFromExtensionMapping(Class<T> type)
Gets the extension for the given type from the extensionMapping |
|
boolean |
isOverriden(Class<?> extensionClass)
Check to see if a specific extension interface is beeing overloaded |
|
|
load(Class<T> extensionClass,
Archive<?> baseArchive)
Load a Extension. |
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
ClassLoader
s to
create extensions
classLoaders
-
IllegalArgumentException
- If the ClassLoader
is not specifiedMethod Detail |
---|
public <T extends Assignable> T load(Class<T> extensionClass, Archive<?> baseArchive) throws UnknownExtensionTypeException
load
in interface ExtensionLoader
extensionClass
- The Extension interfacebaseArchive
- The base archive to use
UnknownExtensionTypeException
ExtensionLoader.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 ExtensionLoader
T
- The type of ExtensionextensionClass
- The Extension interface classextensionImplClass
- The Extension implementation class
ExtensionLoader.addOverride(java.lang.Class, java.lang.Class)
public <T extends Assignable> String getExtensionFromExtensionMapping(Class<T> type)
getExtensionFromExtensionMapping
in interface ExtensionLoader
T
- The type of Extensiontype
- The Extension interface class
ExtensionLoader.getExtensionFromExtensionMapping(java.lang.Class)
public <T extends Archive<T>> ArchiveFormat getArchiveFormatFromExtensionMapping(Class<T> type)
ArchiveFormat
for the given type from the extensionMapping
getArchiveFormatFromExtensionMapping
in interface ExtensionLoader
T
- The type of Extensiontype
- The Extension interface class
ExtensionLoader.getArchiveFormatFromExtensionMapping(java.lang.Class)
public boolean isOverriden(Class<?> extensionClass)
extensionClass
- The ExtensionType interface class
|
ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |