Class GeometryFunctionRegistry

java.lang.Object
org.locationtech.jtstest.geomop.GeometryFunctionRegistry

public class GeometryFunctionRegistry extends Object
A registry to manage a collection of GeometryFunctions.
  • Field Details

    • functions

      private List functions
  • Constructor Details

    • GeometryFunctionRegistry

      public GeometryFunctionRegistry()
    • GeometryFunctionRegistry

      public GeometryFunctionRegistry(Class clz)
  • Method Details

    • create

      public static GeometryFunctionRegistry create()
    • hasGeometryResult

      public static boolean hasGeometryResult(GeometryFunction func)
    • add

      public void add(Class geomFuncClass)
      Adds functions for all the static methods in the given class.
      Parameters:
      geomFuncClass -
    • add

      public void add(String geomFuncClassname) throws ClassNotFoundException
      Adds functions for all the static methods in the given class.
      Parameters:
      geomFuncClassname - the name of the class to load and extract functions from
      Throws:
      ClassNotFoundException
    • add

      public void add(Collection funcs)
    • createFunctions

      public List createFunctions(Class functionClass)
      Create GeometryFunctions for all the static methods in the given class
      Parameters:
      functionClass -
      Returns:
      a list of the functions created
    • add

      public void add(GeometryFunction func)
      Adds a function if it does not currently exist in the registry, or replaces the existing one with the same signature.
      Parameters:
      func - a function
    • find

      public GeometryFunction find(String name, int argCount)
      Finds the first function which matches the given name and argument count.
      Parameters:
      name -
      Returns:
      a matching function, or null
    • find

      public GeometryFunction find(String name)
      Finds the first function which matches the given name.
      Parameters:
      name -
      Returns:
      a matching function, or null