Class GeometryFactories

java.lang.Object
org.apache.sis.internal.feature.GeometryFactories

final class GeometryFactories extends Object
The list of factories available in the current environment. This list depends on which dependencies (JTS, ERSI, etc.) are available at runtime. This list needs to be created in another class than Geometries for avoiding class initialization order problem when a Geometries subclass starts its initialization before Geometries (in such case, an Factory.INSTANCE field may be null).

Note: we can bring this code back into Geometries if JEP 8209964 is implemented.

Since:
1.1
Version:
1.1
  • Field Details

    • implementation

      static final Geometries<?> implementation
      The default geometry implementation to use. The default implementation is JTS if present, or otherwise ESRI if present, or otherwise Java2D.
  • Constructor Details

    • GeometryFactories

      private GeometryFactories()
      Do not allow instantiation of this class.
  • Method Details

    • link

      private static Geometries<?> link(Geometries<?> previous, String name)
      Gets the library implementation of the given package (JTS or ESRI) if present. The given name shall be the sub-package name of a Factory class. The last registered library will be the default implementation.