Package dev.getelements.elements.sdk.spi
Class SpiUtilities
java.lang.Object
dev.getelements.elements.sdk.spi.SpiUtilities
Some utility classes useful to SPI Implementations.
-
Method Summary
Modifier and TypeMethodDescription<T> void
bind
(ClassLoader classLoader, Class<?> providerType, T instance, Class<? super T> interfaceT) Binds the supplied object to the provider type.static SpiUtilities
-
Method Details
-
getInstance
-
bind
public <T> void bind(ClassLoader classLoader, Class<?> providerType, T instance, Class<? super T> interfaceT) Binds the supplied object to the provider type.- Parameters:
classLoader
- theClassLoader
to useproviderType
- the SPI provider type which has a static setInstance methodinstance
- the instance to set
-