Top Description Inners Methods
javax.money.spi

public Interface MonetaryAmountFactoryProviderSpi<T extends javax.money.MonetaryAmount>

Type Parameters
<T>
the concrete amount type.
Imports
javax.money.MonetaryAmount, .MonetaryAmountFactory, .MonetaryContext

SPI (core): Implementations of this interface are used by the MonetaryAmountsSingletonSpi to evaluate the correct javax.money.MonetaryAmountFactory instances.
Author
Anatole Tresch

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy

Determines how the factory should be considered when querying for matching implementation types calling javax.money.Monetary#getAmountFactory(javax.money.MonetaryAmountFactoryQuery) .

Method Summary

Modifier and TypeMethod and Description
public MonetaryAmountFactory<T>

Returns:

the corresponding javax.money.MonetaryAmountFactory, or null.
createMonetaryAmountFactory
()

Access a javax.money.MonetaryAmountFactory given the required context.

public Class<T>

Returns:

the concrete amount type created, never null.
getAmountType
()

Get the concrete amount type created by javax.money.MonetaryAmountFactory instances provided.

public MonetaryContext

Returns:

the default MonetaryContext, never null.
getDefaultMonetaryContext
()

Returns the default MonetaryContext used, when no MonetaryContext is provided.

public default MonetaryContext

Returns:

the maximal MonetaryContext supported, never null
getMaximalMonetaryContext
()

Returns the maximal MonetaryContext supported, for requests that exceed these maximal capabilities, an ArithmeticException must be thrown.

public default MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy

Returns:

true to include this factory into the evaluation.
getQueryInclusionPolicy
()

Method that determines if this factory should be considered for general evaluation of matching MonetaryAmount implementation types when calling javax.money.Monetary#getAmountFactory(javax.money.MonetaryAmountFactoryQuery).

Method Detail

createMonetaryAmountFactoryback to summary
public MonetaryAmountFactory<T> createMonetaryAmountFactory()

Access a javax.money.MonetaryAmountFactory given the required context.

Returns:MonetaryAmountFactory<T>

the corresponding javax.money.MonetaryAmountFactory, or null.

getAmountTypeback to summary
public Class<T> getAmountType()

Get the concrete amount type created by javax.money.MonetaryAmountFactory instances provided.

Returns:Class<T>

the concrete amount type created, never null.

getDefaultMonetaryContextback to summary
public MonetaryContext getDefaultMonetaryContext()

Returns the default MonetaryContext used, when no MonetaryContext is provided.

The default context is not allowed to exceed the capabilities of the maximal MonetaryContext supported.

Returns:MonetaryContext

the default MonetaryContext, never null.

See Also
getMaximalMonetaryContext()
getMaximalMonetaryContextback to summary
public default MonetaryContext getMaximalMonetaryContext()

Returns the maximal MonetaryContext supported, for requests that exceed these maximal capabilities, an ArithmeticException must be thrown.

Returns:MonetaryContext

the maximal MonetaryContext supported, never null

getQueryInclusionPolicyback to summary
public default MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy getQueryInclusionPolicy()

Method that determines if this factory should be considered for general evaluation of matching MonetaryAmount implementation types when calling javax.money.Monetary#getAmountFactory(javax.money.MonetaryAmountFactoryQuery).

Returns:MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy

true to include this factory into the evaluation.

See Also
javax.money.Monetary#getAmountFactory(javax.money.MonetaryAmountFactoryQuery)
javax.money.spi back to summary

public final Enum MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy

extends Enum<MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy>
Class Inheritance

Determines how the factory should be considered when querying for matching implementation types calling javax.money.Monetary#getAmountFactory(javax.money.MonetaryAmountFactoryQuery) .
See Also
javax.money.Monetary#getAmountFactory(javax.money.MonetaryAmountFactoryQuery)

Field Summary

Modifier and TypeField and Description
public static final MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy
ALWAYS

Always include this factory (and the corresponding amount type) within queries.

public static final MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy
DIRECT_REFERENCE_ONLY

Only consider this factory, when the implementation type is specified explicitly in the MonetaryContext required.

public static final MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy
NEVER

Never consider this factory in a query for a matching MonetaryAmount implementation.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy
public static MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ALWAYSback to summary
public static final MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy ALWAYS

Always include this factory (and the corresponding amount type) within queries. This is the default for normal MonetaryAmount implementation types.

DIRECT_REFERENCE_ONLYback to summary
public static final MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy DIRECT_REFERENCE_ONLY

Only consider this factory, when the implementation type is specified explicitly in the MonetaryContext required.

NEVERback to summary
public static final MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy NEVER

Never consider this factory in a query for a matching MonetaryAmount implementation.

Constructor Detail

QueryInclusionPolicyback to summary
private QueryInclusionPolicy()

Method Detail

valueOfback to summary
public static MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy valueOf(String name)
valuesback to summary
public static MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy[] values()