try {
if (method.getReturnType() == boolean.class) {
return new BooleanResult((Boolean) method.invoke(geometry, args));
}
if (Geometry.class.isAssignableFrom(method.getReturnType())) {
return new GeometryResult((Geometry) method.invoke(geometry, args));
}
if (method.getReturnType() == double.class) {
return new DoubleResult((Double) method.invoke(geometry, args));
}
if (method.getReturnType() == int.class) {