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 CoordinateOperationAuthorityFactoryFactory to use for buildingCoordinateOperationinstances from authority codes, ornullif none.protected CoordinateOperationFactoryFactory to use for buildingCoordinateOperationinstances, ornullif none.protected CRSAuthorityFactoryFactory to use for buildingCoordinateReferenceSysteminstances from authority codes, ornullif none.protected CRSFactoryFactory to use for buildingCoordinateReferenceSysteminstances, ornullif none.protected CSAuthorityFactoryThe factory to use for creating coordinate system instances from authority codes, ornullif none.protected CSFactoryThe factory to use for creating coordinate system instances, ornullif none.protected DatumAuthorityFactoryFactory to use for buildingDatuminstances from authority codes, ornullif none.protected DatumFactoryFactory to use for buildingDatuminstances, ornullif none.protected MathTransformFactoryThe factory to use for fetching operation methods and buildingMathTransforminstances, ornullif none. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <T> Optional<T>Returns the factory to test for the specified type.static booleanisSupported(Class<?> type) Returnstrueif the given type is supported by theget(…)method.
-
Field Details
-
crsAuthorityFactory
Factory to use for buildingCoordinateReferenceSysteminstances from authority codes, ornullif none. -
crsFactory
Factory to use for buildingCoordinateReferenceSysteminstances, ornullif none. -
csAuthorityFactory
The factory to use for creating coordinate system instances from authority codes, ornullif none. May also be used for fetchingUnitinstances. -
csFactory
The factory to use for creating coordinate system instances, ornullif none. -
datumAuthorityFactory
Factory to use for buildingDatuminstances from authority codes, ornullif none. May also be used for buildingEllipsoidandPrimeMeridiancomponents. -
datumFactory
Factory to use for buildingDatuminstances, ornullif none. May also be used for buildingEllipsoidandPrimeMeridiancomponents. -
copAuthorityFactory
Factory to use for buildingCoordinateOperationinstances from authority codes, ornullif none. -
copFactory
Factory to use for buildingCoordinateOperationinstances, ornullif none. -
mtFactory
The factory to use for fetching operation methods and buildingMathTransforminstances, ornullif 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 thetypeargument.- Parameters:
type- GeoAPI interface of the desired factory.- Returns:
- factory for the specified interface.
-
isSupported
Returnstrueif the given type is supported by theget(…)method. Note that atruevalue 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.
-