Class GeometryFunctionRegistry


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

      Fields 
      Modifier and Type Field Description
      private java.util.List functions  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Class geomFuncClass)
      Adds functions for all the static methods in the given class.
      void add​(java.lang.String geomFuncClassname)
      Adds functions for all the static methods in the given class.
      void add​(java.util.Collection funcs)  
      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.
      static GeometryFunctionRegistry create()  
      java.util.List createFunctions​(java.lang.Class functionClass)
      Create GeometryFunctions for all the static methods in the given class
      GeometryFunction find​(java.lang.String name)
      Finds the first function which matches the given name.
      GeometryFunction find​(java.lang.String name, int argCount)
      Finds the first function which matches the given name and argument count.
      static boolean hasGeometryResult​(GeometryFunction func)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • functions

        private java.util.List functions
    • Constructor Detail

      • GeometryFunctionRegistry

        public GeometryFunctionRegistry()
      • GeometryFunctionRegistry

        public GeometryFunctionRegistry​(java.lang.Class clz)
    • Method Detail

      • hasGeometryResult

        public static boolean hasGeometryResult​(GeometryFunction func)
      • add

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

        public void add​(java.lang.String geomFuncClassname)
                 throws java.lang.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:
        java.lang.ClassNotFoundException
      • add

        public void add​(java.util.Collection funcs)
      • createFunctions

        public java.util.List createFunctions​(java.lang.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​(java.lang.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​(java.lang.String name)
        Finds the first function which matches the given name.
        Parameters:
        name -
        Returns:
        a matching function, or null