Class StaticMethodGeometryFunction
java.lang.Object
org.locationtech.jtstest.geomfunction.BaseGeometryFunction
org.locationtech.jtstest.geomfunction.StaticMethodGeometryFunction
- All Implemented Interfaces:
Comparable
,GeometryFunction
A
GeometryFunction
which calls a static
Method
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private Method
private static final String
private static final String
private static final String
Fields inherited from class org.locationtech.jtstest.geomfunction.BaseGeometryFunction
category, description, name, parameterNames, parameterTypes, returnType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Object[]
createFullArgs
(Geometry g, Object[] arg) Creates an arg array which includes the target geometry as the first argumentstatic StaticMethodGeometryFunction
createFunction
(Method method) private static String[]
defaultParamNames
(Method method) private static String
extractCategory
(String className) private static String
extractDescription
(Method method) private static String[]
extractParamNames
(Method method) Java doesn't permit accessing the original code parameter names, unfortunately.private static Class[]
extractParamTypes
(Method method) private static int
firstScalarParamIndex
(Method method) static String
getClassname
(Class javaClass) private static String
static Object
Invokes this function.private static String
paramNamePrimary
(Class<?> clz) Methods inherited from class org.locationtech.jtstest.geomfunction.BaseGeometryFunction
compareTo, equals, firstScalarParamIndex, getCategory, getDescription, getDoubleOrNull, getIntegerOrNull, getName, getParameterNames, getParameterTypes, getReturnType, getSignature, isBinary, isBinaryGeomFunction
-
Field Details
-
PARAM_NAME_TEXT
- See Also:
-
PARAM_NAME_COUNT
- See Also:
-
PARAM_NAME_DISTANCE
- See Also:
-
FUNCTIONS_SUFFIX
- See Also:
-
method
-
-
Constructor Details
-
StaticMethodGeometryFunction
-
-
Method Details
-
createFunction
-
extractCategory
-
extractParamNames
Java doesn't permit accessing the original code parameter names, unfortunately.- Parameters:
method
-- Returns:
-
defaultParamNames
-
firstScalarParamIndex
-
paramNamePrimary
-
extractDescription
-
extractParamTypes
-
invoke
Description copied from interface:GeometryFunction
Invokes this function. Note that any exceptions returned must beRuntimeException
s.- Specified by:
invoke
in interfaceGeometryFunction
- Specified by:
invoke
in classBaseGeometryFunction
- Parameters:
g
- the target geometryarg
- the other arguments to the function- Returns:
- the value computed by the function
-
createFullArgs
Creates an arg array which includes the target geometry as the first argument- Parameters:
g
-arg
-- Returns:
-
invoke
-
invocationErrMsg
-
getClassname
-