public class DefaultMonetaryAmountsSpi extends Object implements javax.money.spi.MonetaryAmountsSpi
MonetaryAmountsSpi loading the SPIs on startup initially once, using the
JSR's Bootstrap mechanism.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMonetaryAmountsSpi.ProviderComparator
Comparator used for ordering the services provided.
|
| Constructor and Description |
|---|
DefaultMonetaryAmountsSpi() |
| Modifier and Type | Method and Description |
|---|---|
static <T> int |
comparePriority(T service1,
T service2)
Compare two service priorities given the same service interface.
|
<T extends javax.money.MonetaryAmount> |
getAmountFactory(Class<T> amountType) |
Set<Class<? extends javax.money.MonetaryAmount>> |
getAmountTypes() |
Class<? extends javax.money.MonetaryAmount> |
getDefaultAmountType() |
Class<? extends javax.money.MonetaryAmount> |
queryAmountType(javax.money.MonetaryContext requiredContext)
(non-Javadoc)
|
public DefaultMonetaryAmountsSpi()
public static <T> int comparePriority(T service1, T service2)
T - the interface typeservice1 - first service, not null.service2 - second service, not null.public <T extends javax.money.MonetaryAmount> javax.money.MonetaryAmountFactory<T> getAmountFactory(Class<T> amountType)
getAmountFactory in interface javax.money.spi.MonetaryAmountsSpipublic Set<Class<? extends javax.money.MonetaryAmount>> getAmountTypes()
getAmountTypes in interface javax.money.spi.MonetaryAmountsSpipublic Class<? extends javax.money.MonetaryAmount> getDefaultAmountType()
getDefaultAmountType in interface javax.money.spi.MonetaryAmountsSpipublic Class<? extends javax.money.MonetaryAmount> queryAmountType(javax.money.MonetaryContext requiredContext)
queryAmountType in interface javax.money.spi.MonetaryAmountsSpiMonetaryAmountsSpi.queryAmountType(javax.money.MonetaryContext)Copyright © 2012-2014 JavaMoney. All Rights Reserved.