public class DefaultServiceProvider extends javax.measure.spi.ServiceProvider implements Comparable<javax.measure.spi.ServiceProvider>
ServiceProvider class and
hereby uses the JDK ServiceLoader to load the required
services.| Constructor and Description |
|---|
DefaultServiceProvider() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(javax.measure.spi.ServiceProvider o) |
int |
getPriority()
Returns a priority value of 10.
|
<Q extends javax.measure.Quantity<Q>> |
getQuantityFactory(Class<Q> quantity)
Return a factory for this quantity
|
protected <T> T |
getService(Class<T> serviceType) |
protected <T> List<T> |
getServices(Class<T> serviceType)
Loads and registers services.
|
javax.measure.spi.SystemOfUnitsService |
getSystemOfUnitsService() |
javax.measure.spi.UnitFormatService |
getUnitFormatService() |
public DefaultServiceProvider()
public int getPriority()
getPriority in class javax.measure.spi.ServiceProviderprotected <T> List<T> getServices(Class<T> serviceType)
T - the concrete type.serviceType - The service type.null.protected <T> T getService(Class<T> serviceType)
public int compareTo(javax.measure.spi.ServiceProvider o)
compareTo in interface Comparable<javax.measure.spi.ServiceProvider>public javax.measure.spi.SystemOfUnitsService getSystemOfUnitsService()
getSystemOfUnitsService in class javax.measure.spi.ServiceProviderpublic javax.measure.spi.UnitFormatService getUnitFormatService()
getUnitFormatService in class javax.measure.spi.ServiceProviderpublic final <Q extends javax.measure.Quantity<Q>> javax.measure.spi.QuantityFactory<Q> getQuantityFactory(Class<Q> quantity)
getQuantityFactory in class javax.measure.spi.ServiceProviderquantity - the quantity typeQuantityFactoryNullPointerExceptionCopyright © 2005–2017 Units of Measurement project. All rights reserved.