Package org.locationtech.jtstest.geomop
Class LoggingGeometryOperation
- java.lang.Object
-
- org.locationtech.jtstest.geomop.LoggingGeometryOperation
-
- All Implemented Interfaces:
GeometryOperation
public class LoggingGeometryOperation extends Object implements GeometryOperation
AGeometryOperationwhich logs the input and output from anotherGeometryOperation. The log is sent toSystem.out.- Author:
- mbdavis
-
-
Constructor Summary
Constructors Constructor Description LoggingGeometryOperation()LoggingGeometryOperation(GeometryOperation geomOp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Constructor Detail
-
LoggingGeometryOperation
public LoggingGeometryOperation()
-
LoggingGeometryOperation
public LoggingGeometryOperation(GeometryOperation geomOp)
-
-
Method Detail
-
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
-
-