Package org.locationtech.jtstest.geomop
Class GeometryMethodOperation
- java.lang.Object
-
- org.locationtech.jtstest.geomop.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 aGeometry. This class provides operations which are the methods defined on the Geometry class. OtherGeometryOperationclasses can delegate to instances of this class to run standard Geometry methods.- Version:
- 1.7
- Author:
- Martin Davis
-
-
Constructor Summary
Constructors Constructor Description GeometryMethodOperation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClassgetGeometryReturnType(String functionName)ClassgetReturnType(String opName)Gets the class of the return type of the given operation.Resultinvoke(String opName, Geometry geometry, Object[] args)Invokes an operation on aGeometry.static booleanisBooleanFunction(String name)static booleanisDoubleFunction(String name)static booleanisGeometryFunction(String name)static booleanisIntegerFunction(String name)
-
-
-
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)
-
getReturnType
public Class getReturnType(String opName)
Description copied from interface:GeometryOperationGets the class of the return type of the given operation.- Specified by:
getReturnTypein interfaceGeometryOperation- 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:GeometryOperationInvokes an operation on aGeometry.- Specified by:
invokein interfaceGeometryOperation- Parameters:
opName- name of the operationgeometry- the geometry to processargs- 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
-
-