Package org.locationtech.jtstest.geomop
Class BufferValidatedGeometryOperation
- java.lang.Object
-
- org.locationtech.jtstest.geomop.BufferValidatedGeometryOperation
-
- All Implemented Interfaces:
GeometryOperation
public class BufferValidatedGeometryOperation extends Object implements GeometryOperation
AGeometryOperationwhich validates the results of theGeometrybuffer() method. If an invalid result is found, an exception is thrown (this is the most convenient and noticeable way of flagging the problem when using the TestRunner). All other Geometry methods are executed normally.This class can be used via the -geomop command-line option or by the <geometryOperation> XML test file setting.
- Author:
- mbdavis
-
-
Constructor Summary
Constructors Constructor Description BufferValidatedGeometryOperation()BufferValidatedGeometryOperation(GeometryMethodOperation chainOp)Creates a new operation which chains to the givenGeometryMethodOperationfor non-intercepted methods.
-
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 the named operation
-
-
-
Constructor Detail
-
BufferValidatedGeometryOperation
public BufferValidatedGeometryOperation()
-
BufferValidatedGeometryOperation
public BufferValidatedGeometryOperation(GeometryMethodOperation chainOp)
Creates a new operation which chains to the givenGeometryMethodOperationfor non-intercepted methods.- Parameters:
chainOp- the operation to chain to
-
-
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
Invokes the named operation- Specified by:
invokein interfaceGeometryOperation- Parameters:
opName-geometry-args-- Returns:
- the result
- Throws:
Exception- See Also:
GeometryOperation.invoke(java.lang.String, org.locationtech.jts.geom.Geometry, java.lang.Object[])
-
-