public abstract class TeeGeometryOperation extends java.lang.Object implements GeometryOperation
GeometryOperation which executes the original operation
and returns that result,
but also executes a separate operation (which could be multiple operations).
The side operations can throw exceptions if they do not compute
correct results. This relies on the availability of
another reliable implementation to provide the expected result.
This class can be used via the -geomop command-line option or by the <geometryOperation> XML test file setting.
| Modifier and Type | Field and Description |
|---|---|
private GeometryMethodOperation |
chainOp |
| Constructor and Description |
|---|
TeeGeometryOperation() |
TeeGeometryOperation(GeometryMethodOperation chainOp)
Creates a new operation which chains to the given
GeometryMethodOperation
for non-intercepted methods. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class |
getReturnType(java.lang.String opName)
Gets the class of the return type of the given operation.
|
Result |
invoke(java.lang.String opName,
Geometry geometry,
java.lang.Object[] args)
Invokes the named operation
|
protected abstract void |
runTeeOp(java.lang.String opName,
Geometry geometry,
java.lang.Object[] args) |
private GeometryMethodOperation chainOp
public TeeGeometryOperation()
public TeeGeometryOperation(GeometryMethodOperation chainOp)
GeometryMethodOperation
for non-intercepted methods.chainOp - the operation to chain topublic java.lang.Class getReturnType(java.lang.String opName)
GeometryOperationgetReturnType in interface GeometryOperationopName - the name of the operationpublic Result invoke(java.lang.String opName, Geometry geometry, java.lang.Object[] args) throws java.lang.Exception
invoke in interface GeometryOperationopName - geometry - args - java.lang.ExceptionGeometryOperation.invoke(java.lang.String, org.locationtech.jts.geom.Geometry, java.lang.Object[])protected abstract void runTeeOp(java.lang.String opName,
Geometry geometry,
java.lang.Object[] args)