Package org.geotools.geometry.jts
Class JTSFactoryFinder
Object
FactoryFinder
JTSFactoryFinder
- Author:
 - Martin Desruisseaux
 
- 
Field Summary
Fields inherited from class FactoryFinder
EMPTY_HINTS - 
Method Summary
Modifier and TypeMethodDescriptionstatic Set<CoordinateSequenceFactory>Returns a set of all available implementations for theCoordinateSequenceFactoryinterface.static CoordinateSequenceFactoryReturns the first implementation ofCoordinateSequenceFactorymatching the specified hints.static Set<GeometryFactory>Returns a set of all available implementations for theGeometryFactorycategory.static GeometryFactoryReturns the first implementation ofGeometryFactory, a new one is created if possible or an exception is thrown otherwise.static GeometryFactorygetGeometryFactory(Hints hints) Returns the first implementation ofGeometryFactorymatching the specified hints.static PrecisionModelgetPrecisionModel(Hints hints) Returns the first implementation ofPrecisionModelmatching the specified hints.static Set<PrecisionModel>Returns a set of all available implementations for thePrecisionModelcategory.static voidScans for factory plug-ins on the application class path.Methods inherited from class FactoryFinder
mergeSystemHints 
- 
Method Details
- 
getGeometryFactory
Returns the first implementation ofGeometryFactorymatching the specified hints. If no implementation matches, a new one is created if possible or an exception is thrown otherwise.Hints that may be understood includes
JTS_COORDINATE_SEQUENCE_FACTORY,JTS_PRECISION_MODELandJTS_SRID.- Parameters:
 hints- An optional map of hints, ornullif none.- Returns:
 - The first geometry factory that matches the supplied hints.
 - Throws:
 FactoryRegistryException- if no implementation was found or can be created for theGeometryFactorycategory and the given hints.
 - 
getGeometryFactory
Returns the first implementation ofGeometryFactory, a new one is created if possible or an exception is thrown otherwise.- Returns:
 - The first geometry factory available on the classpath
 - Throws:
 FactoryRegistryException- if no implementation was found or can be created for theGeometryFactorycategory.
 - 
getGeometryFactories
Returns a set of all available implementations for theGeometryFactorycategory.- Returns:
 - Set of available geometry factory implementations.
 
 - 
getPrecisionModel
Returns the first implementation ofPrecisionModelmatching the specified hints. If no implementation matches, a new one is created if possible or an exception is thrown otherwise.- Parameters:
 hints- An optional map of hints, ornullif none.- Returns:
 - The first precision model that matches the supplied hints.
 - Throws:
 FactoryRegistryException- if no implementation was found or can be created for thePrecisionModelcategory and the given hints.
 - 
getPrecisionModels
Returns a set of all available implementations for thePrecisionModelcategory.- Returns:
 - Set of available precision model implementations.
 
 - 
getCoordinateSequenceFactory
public static CoordinateSequenceFactory getCoordinateSequenceFactory(Hints hints) throws FactoryRegistryException Returns the first implementation ofCoordinateSequenceFactorymatching the specified hints. If no implementation matches, a new one is created if possible or an exception is thrown otherwise.- Parameters:
 hints- An optional map of hints, ornullif none.- Returns:
 - The first coordinate sequence factory that matches the supplied hints.
 - Throws:
 FactoryRegistryException- if no implementation was found or can be created for theCoordinateSequenceFactoryinterface and the given hints.
 - 
getCoordinateSequenceFactories
Returns a set of all available implementations for theCoordinateSequenceFactoryinterface.- Returns:
 - Set of available coordinate sequence factory implementations.
 
 - 
scanForPlugins
public static void scanForPlugins()Scans for factory plug-ins on the application class path. This method is needed because the application class path can theoretically change, or additional plug-ins may become available. Rather than re-scanning the classpath on every invocation of the API, the class path is scanned automatically only on the first invocation. Clients can call this method to prompt a re-scan. Thus this method need only be invoked by sophisticated applications which dynamically make new plug-ins available at runtime. 
 -