@ServicePriority(value=10) public final class MoneyAmountFactoryProvider extends java.lang.Object implements javax.money.spi.MonetaryAmountFactoryProviderSpi<Money>
MonetaryAmountFactoryProviderSpi
creating instances of
MoneyAmountFactory
.Constructor and Description |
---|
MoneyAmountFactoryProvider() |
Modifier and Type | Method and Description |
---|---|
javax.money.MonetaryAmountFactory<Money> |
createMonetaryAmountFactory()
Access a
MonetaryAmountFactory given the required context. |
java.lang.Class<Money> |
getAmountType()
Get the concrete amount type created by
MonetaryAmountFactory instances provided. |
javax.money.MonetaryContext |
getDefaultMonetaryContext()
Returns the default
MonetaryContext used, when no MonetaryContext is
provided. |
javax.money.MonetaryContext |
getMaximalMonetaryContext()
Returns the maximal
MonetaryContext supported, for requests that exceed these maximal
capabilities, an ArithmeticException must be thrown. |
javax.money.spi.MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy |
getQueryInclusionPolicy()
Method that determines if this factory should be considered for general evaluation of
matching
MonetaryAmount implementation types when calling
MonetaryAmounts.queryAmountType(MonetaryContext) . |
public javax.money.MonetaryAmountFactory<Money> createMonetaryAmountFactory()
javax.money.spi.MonetaryAmountFactoryProviderSpi
MonetaryAmountFactory
given the required context.createMonetaryAmountFactory
in interface javax.money.spi.MonetaryAmountFactoryProviderSpi<Money>
MonetaryAmountFactory
, or null
.public java.lang.Class<Money> getAmountType()
javax.money.spi.MonetaryAmountFactoryProviderSpi
MonetaryAmountFactory
instances provided.getAmountType
in interface javax.money.spi.MonetaryAmountFactoryProviderSpi<Money>
public javax.money.MonetaryContext getDefaultMonetaryContext()
javax.money.spi.MonetaryAmountFactoryProviderSpi
MonetaryContext
used, when no MonetaryContext
is
provided.
The default context is not allowed to exceed the capabilities of the maximal
MonetaryContext
supported.
getDefaultMonetaryContext
in interface javax.money.spi.MonetaryAmountFactoryProviderSpi<Money>
MonetaryContext
, never null
.MonetaryAmountFactoryProviderSpi.getMaximalMonetaryContext()
public javax.money.MonetaryContext getMaximalMonetaryContext()
javax.money.spi.MonetaryAmountFactoryProviderSpi
MonetaryContext
supported, for requests that exceed these maximal
capabilities, an ArithmeticException
must be thrown.getMaximalMonetaryContext
in interface javax.money.spi.MonetaryAmountFactoryProviderSpi<Money>
MonetaryContext
supported, never null
public javax.money.spi.MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy getQueryInclusionPolicy()
javax.money.spi.MonetaryAmountFactoryProviderSpi
MonetaryAmount
implementation types when calling
MonetaryAmounts.queryAmountType(MonetaryContext)
.getQueryInclusionPolicy
in interface javax.money.spi.MonetaryAmountFactoryProviderSpi<Money>
true
to include this factory into the evaluation.MonetaryAmounts.queryAmountType(MonetaryContext)