public interface MonetaryAmountsSingletonSpi
Monetary
singleton. It
should load and manage (including contextual behavior), if needed) the different registered
MonetaryAmountFactory
instances.Modifier and Type | Method and Description |
---|---|
default Collection<MonetaryAmountFactory<?>> |
getAmountFactories()
Get the currently registered
MonetaryAmount implementation classes. |
<T extends MonetaryAmount> |
getAmountFactory(Class<T> amountType)
Access the
MonetaryAmountFactory for the given amountType . |
Collection<Class<? extends MonetaryAmount>> |
getAmountTypes()
Get the currently registered
MonetaryAmount implementation types. |
default MonetaryAmountFactory<?> |
getDefaultAmountFactory()
Access the default
MonetaryAmountFactory . |
Class<? extends MonetaryAmount> |
getDefaultAmountType()
Access the default
MonetaryAmount implementation type. |
<T extends MonetaryAmount> MonetaryAmountFactory<T> getAmountFactory(Class<T> amountType)
MonetaryAmountFactory
for the given amountType
.amountType
- the MonetaryAmount
implementation type, targeted by the factory.MonetaryAmountFactory
, or null
, if no such
MonetaryAmountFactory
is available in the current context.Class<? extends MonetaryAmount> getDefaultAmountType()
MonetaryAmount
implementation type.MonetaryAmount
type corresponding, never null
.MonetaryException
- if no MonetaryAmountFactoryProviderSpi
is available, or no
MonetaryAmountFactoryProviderSpi
targeting the configured default
MonetaryAmount
type.Monetary.getDefaultAmountType()
Collection<Class<? extends MonetaryAmount>> getAmountTypes()
MonetaryAmount
implementation types.Set
if registered MonetaryAmount
implementations, never
null
.default MonetaryAmountFactory<?> getDefaultAmountFactory()
MonetaryAmountFactory
.MonetaryAmount
type corresponding, never null
.MonetaryException
- if no MonetaryAmountFactoryProviderSpi
is available, or no
MonetaryAmountFactoryProviderSpi
targeting the configured default
MonetaryAmount
type.Monetary.getDefaultAmountType()
default Collection<MonetaryAmountFactory<?>> getAmountFactories()
MonetaryAmount
implementation classes.Set
if registered MonetaryAmount
implementations, never
null
.Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.