Class StaticMethodGeometryFunction

    • Field Detail

      • FUNCTIONS_SUFFIX

        private static final java.lang.String FUNCTIONS_SUFFIX
        See Also:
        Constant Field Values
      • PARAMETERS_SUFFIX

        private static final java.lang.String PARAMETERS_SUFFIX
        See Also:
        Constant Field Values
      • DESCRIPTION_SUFFIX

        private static final java.lang.String DESCRIPTION_SUFFIX
        See Also:
        Constant Field Values
      • method

        private java.lang.reflect.Method method
    • Constructor Detail

      • StaticMethodGeometryFunction

        public StaticMethodGeometryFunction​(java.lang.String name,
                                            java.lang.String description,
                                            java.lang.String[] parameterNames,
                                            java.lang.Class[] parameterTypes,
                                            java.lang.Class returnType,
                                            java.lang.reflect.Method method)
    • Method Detail

      • extractParamTypes

        private static java.lang.Class[] extractParamTypes​(java.lang.reflect.Method method)
      • invoke

        public java.lang.Object invoke​(Geometry g,
                                       java.lang.Object[] arg)
        Description copied from interface: GeometryFunction
        Invokes this function. Note that any exceptions returned must be RuntimeExceptions.
        Specified by:
        invoke in interface GeometryFunction
        Specified by:
        invoke in class BaseGeometryFunction
        Parameters:
        g - the target geometry
        arg - the other arguments to the function
        Returns:
        the value computed by the function
      • createFullArgs

        private static java.lang.Object[] createFullArgs​(Geometry g,
                                                         java.lang.Object[] arg)
        Creates an arg array which includes the target geometry as the first argument
        Parameters:
        g -
        arg -
        Returns:
      • invoke

        public static java.lang.Object invoke​(java.lang.reflect.Method method,
                                              java.lang.Object target,
                                              java.lang.Object[] args)
      • invocationErrMsg

        private static java.lang.String invocationErrMsg​(java.lang.reflect.InvocationTargetException ex)
      • getClassname

        public static java.lang.String getClassname​(java.lang.Class javaClass)