java.lang.Object
javax.money.spi.Bootstrap
public final class Bootstrap
extends java.lang.Object
This singleton provides access to the services available in the current runtime environment and context. The
behaviour can be adapted, by calling
init(ServiceProvider)
before accessing any monetary
services.- Author:
- Anatole Tresch
-
Method Summary
Modifier and Type Method Description static <T> T
getService(java.lang.Class<T> serviceType)
Delegate method forServiceProvider.getServices(Class)
.static <T> java.util.Collection<T>
getServices(java.lang.Class<T> serviceType)
Delegate method forServiceProvider.getServices(Class)
.static ServiceProvider
init(ServiceProvider serviceProvider)
Replace the currentServiceProvider
in use.
-
Method Details
-
init
Replace the currentServiceProvider
in use.- Parameters:
serviceProvider
- the newServiceProvider
- Returns:
- the removed , or null.
-
getServices
public static <T> java.util.Collection<T> getServices(java.lang.Class<T> serviceType)Delegate method forServiceProvider.getServices(Class)
.- Parameters:
serviceType
- the service type.- Returns:
- the services found.
- See Also:
ServiceProvider.getServices(Class)
-
getService
public static <T> T getService(java.lang.Class<T> serviceType)Delegate method forServiceProvider.getServices(Class)
.- Parameters:
serviceType
- the service type.- Returns:
- the service found, or
null
. - See Also:
ServiceProvider.getServices(Class)
-