Object
Factories
A container for various factory implementations.
This is used as a replacement for long list of arguments in constructors when a test may require
many factories for different kinds of objects (datum, coordinate system, operations, etc).
Implementations can create a Factories
subclass and initialize all fields in their constructor.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CoordinateOperationAuthorityFactory
Factory to use for buildingCoordinateOperation
instances from authority codes, ornull
if none.protected CoordinateOperationFactory
Factory to use for buildingCoordinateOperation
instances, ornull
if none.protected CRSAuthorityFactory
Factory to use for buildingCoordinateReferenceSystem
instances from authority codes, ornull
if none.protected CRSFactory
Factory to use for buildingCoordinateReferenceSystem
instances, ornull
if none.protected CSAuthorityFactory
The factory to use for creating coordinate system instances from authority codes, ornull
if none.protected CSFactory
The factory to use for creating coordinate system instances, ornull
if none.protected DatumAuthorityFactory
Factory to use for buildingDatum
instances from authority codes, ornull
if none.protected DatumFactory
Factory to use for buildingDatum
instances, ornull
if none.protected MathTransformFactory
The factory to use for fetching operation methods and buildingMathTransform
instances, ornull
if none. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <T> Optional<T>
Returns the factory to test for the specified type.static boolean
isSupported
(Class<?> type) Returnstrue
if the given type is supported by theget(…)
method.
-
Field Details
-
crsAuthorityFactory
Factory to use for buildingCoordinateReferenceSystem
instances from authority codes, ornull
if none. -
crsFactory
Factory to use for buildingCoordinateReferenceSystem
instances, ornull
if none. -
csAuthorityFactory
The factory to use for creating coordinate system instances from authority codes, ornull
if none. May also be used for fetchingUnit
instances. -
csFactory
The factory to use for creating coordinate system instances, ornull
if none. -
datumAuthorityFactory
Factory to use for buildingDatum
instances from authority codes, ornull
if none. May also be used for buildingEllipsoid
andPrimeMeridian
components. -
datumFactory
Factory to use for buildingDatum
instances, ornull
if none. May also be used for buildingEllipsoid
andPrimeMeridian
components. -
copAuthorityFactory
Factory to use for buildingCoordinateOperation
instances from authority codes, ornull
if none. -
copFactory
Factory to use for buildingCoordinateOperation
instances, ornull
if none. -
mtFactory
The factory to use for fetching operation methods and buildingMathTransform
instances, ornull
if none.
-
-
Constructor Details
-
Factories
protected Factories()Creates an initially empty set of factories.
-
-
Method Details
-
get
Returns the factory to test for the specified type. This method returns the value of one of the type defined in this class. The field is identified by the value type. For exampleget(CRSFactory.class)
returnscrsFactory
.- Type Parameters:
T
- compile-time value of thetype
argument.- Parameters:
type
- GeoAPI interface of the desired factory.- Returns:
- factory for the specified interface.
-
isSupported
Returnstrue
if the given type is supported by theget(…)
method. Note that atrue
value does not guarantee thatget(type)
will return a non-empty value, because the type may be supported with no value has been specified.- Parameters:
type
- GeoAPI interface of a factory.- Returns:
- whether the given type is supported.
-