Class GeometryMethodOperation

  • All Implemented Interfaces:
    GeometryOperation

    public class GeometryMethodOperation
    extends Object
    implements GeometryOperation
    Invokes a named operation on a set of arguments, the first of which is a Geometry. This class provides operations which are the methods defined on the Geometry class. Other GeometryOperation classes can delegate to instances of this class to run standard Geometry methods.
    Version:
    1.7
    Author:
    Martin Davis
    • Constructor Detail

      • GeometryMethodOperation

        public GeometryMethodOperation()
    • Method Detail

      • isBooleanFunction

        public static boolean isBooleanFunction​(String name)
      • isIntegerFunction

        public static boolean isIntegerFunction​(String name)
      • isDoubleFunction

        public static boolean isDoubleFunction​(String name)
      • isGeometryFunction

        public static boolean isGeometryFunction​(String name)
      • getGeometryReturnType

        public static Class getGeometryReturnType​(String functionName)
      • getReturnType

        public Class getReturnType​(String opName)
        Description copied from interface: GeometryOperation
        Gets the class of the return type of the given operation.
        Specified by:
        getReturnType in interface GeometryOperation
        Parameters:
        opName - the name of the operation
        Returns:
        the class of the return type of the specified operation
      • invoke

        public Result invoke​(String opName,
                             Geometry geometry,
                             Object[] args)
                      throws Exception
        Description copied from interface: GeometryOperation
        Invokes an operation on a Geometry.
        Specified by:
        invoke in interface GeometryOperation
        Parameters:
        opName - name of the operation
        geometry - the geometry to process
        args - the arguments to the operation (which may be typed as Strings)
        Returns:
        the result of the operation
        Throws:
        Exception - if some error was encountered trying to find or process the operation