Package org.locationtech.jtstest.geomop
Class PreparedGeometryOperation
- java.lang.Object
-
- org.locationtech.jtstest.geomop.PreparedGeometryOperation
-
- All Implemented Interfaces:
GeometryOperation
public class PreparedGeometryOperation extends java.lang.Object implements GeometryOperation
AGeometryOperationwhich usesPreparedGeometrys for applicable operations. This allows testing correctness of the PreparedGeometry implementation.This class can be used via the -geomop command-line option or by the <geometryOperation> XML test file setting.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classPreparedGeometryOperation.PreparedGeometryOp
-
Field Summary
Fields Modifier and Type Field Description private GeometryMethodOperationchainOp
-
Constructor Summary
Constructors Constructor Description PreparedGeometryOperation()PreparedGeometryOperation(GeometryMethodOperation chainOp)Creates a new operation which chains to the givenGeometryMethodOperationfor non-intercepted methods.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ClassgetReturnType(java.lang.String opName)Gets the class of the return type of the given operation.Resultinvoke(java.lang.String opName, Geometry geometry, java.lang.Object[] args)Invokes the named operationprivate ResultinvokePreparedOp(java.lang.String opName, Geometry geometry, java.lang.Object[] args)private static booleanisPreparedOp(java.lang.String opName)
-
-
-
Field Detail
-
chainOp
private GeometryMethodOperation chainOp
-
-
Constructor Detail
-
PreparedGeometryOperation
public PreparedGeometryOperation()
-
PreparedGeometryOperation
public PreparedGeometryOperation(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 java.lang.Class getReturnType(java.lang.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
-
isPreparedOp
private static boolean isPreparedOp(java.lang.String opName)
-
invoke
public Result invoke(java.lang.String opName, Geometry geometry, java.lang.Object[] args) throws java.lang.Exception
Invokes the named operation- Specified by:
invokein interfaceGeometryOperation- Parameters:
opName-geometry-args-- Returns:
- the result
- Throws:
java.lang.Exception- See Also:
GeometryOperation.invoke(java.lang.String, org.locationtech.jts.geom.Geometry, java.lang.Object[])
-
-