Create a new JTSGeometryExpression

@param expr Expression of type Geometry
@return new JTSGeometryExpression
966671
public static <T extends Geometry> JTSGeometryExpression<T> asJTSGeometry(
            Expression<T> expr) {
        Expression<T> underlyingMixin = ExpressionUtils.extract(expr);
        return new JTSGeometryExpression<T>(underlyingMixin) {

            private static final long serialVersionUID = -6714044005570420009L;

            @Override
            public <R, C> R accept(Visitor<R, C> v, C context) {
                return this.mixin.accept(v, context);
            }

        };
    }
869023
public static JSTypeExpression makeOptionalArg(JSTypeExpression expr) {
    if (expr.isOptionalArg() || expr.isVarArgs()) {
      return expr;
    } else {
      return new JSTypeExpression(
          new Node(Token.EQUALS, expr.root), expr.sourceName);
    }
  }
726458
@Override
    public List<AbstractExpression> bindingToIndexedExpression(AbstractExpression expr) {
        if (m_originalValue == null || ! m_originalValue.equals(expr)) {
            return null;
        }
        // This parameter's value was matched, so return this as one bound parameter.
        List<AbstractExpression> result = new ArrayList<AbstractExpression>();
        result.add(this);
        return result;
    }
771342
public Expression create(String expression, ExpressionType expressionType, PropertyResolver propertyResolver) {
        if (expressionType == null) {
            expressionType = ExpressionType.MVEL;
        }
        if (propertyResolver == null) {
            propertyResolver = SystemAndTestPropertyResolver.INSTANCE;
        }
        switch (expressionType) {
        case MVEL:
            return new MVELExpression(expression, propertyResolver);
        default:
            throw CommonKnowledgeMessages.MESSAGES.unknownExpressionType(expressionType.toString());
        }
    }
549510
public static ExprInt toExprInt(Expression expr) {
	if (expr instanceof ExprInt) return (ExprInt) expr;
	if (expr instanceof Literal) {
	    Double dbl = ((Literal) expr).getDouble(null);
	    if (dbl != null) return expr.getFactory().createLitInteger((int) dbl.doubleValue(), expr.getStart(), expr.getEnd());
	}
	return new CastInt(expr);
    }
480073
public static <T extends Comparable<?>> DateTimeExpression<T> asDateTime(Expression<T> expr) {
        Expression<T> underlyingMixin = ExpressionUtils.extract(expr);
        if (underlyingMixin instanceof PathImpl) {
            return new DateTimePath<T>((PathImpl<T>) underlyingMixin);
        } else if (underlyingMixin instanceof OperationImpl) {
            return new DateTimeOperation<T>((OperationImpl<T>) underlyingMixin);
        } else if (underlyingMixin instanceof TemplateExpressionImpl) {
            return new DateTimeTemplate<T>((TemplateExpressionImpl<T>) underlyingMixin);
        } else {
            return new DateTimeExpression<T>(underlyingMixin) {

                private static final long serialVersionUID = 8007203530480765244L;

                @Override
                public <R, C> R accept(Visitor<R, C> v, C context) {
                    return this.mixin.accept(v, context);
                }

            };
        }

    }
345932
public static JTSPointExpression<Point> pointOperation(Operator op, Expression<?>... args) {
        return new JTSPointOperation<Point>(Point.class, op, args);
    }
592712
public static NumberExpression<Double> ymax(GeometryExpression<?> expr) {
        return Expressions.numberOperation(Double.class, SpatialOps.YMAX, expr);
    }
664865
public static <T> QBean<T> bean(Path<? extends T> type, Expression<?>... exprs) {
        return new QBean<T>(type.getType(), exprs);
    }
421573
public static Expression fromExpr(JsExpr expr, Iterable<GoogRequire> requires) {
    return Leaf.create(expr, /* isCheap= */ false, requires);
  }
94893
public static ExprFloat toExprFloat(Expression expr) {
	if (expr instanceof ExprFloat) return (ExprFloat) expr;
	if (expr instanceof Literal) {
	    Double dbl = ((Literal) expr).getDouble(null);
	    if (dbl != null) return expr.getFactory().createLitFloat((float) dbl.doubleValue(), expr.getStart(), expr.getEnd());
	}
	return new CastFloat(expr);
    }
1296127
public static MethodExpression createMethodExpression(String p_expression, Class<?> returnType,
			Class<?>... parameterTypes) {
		FacesContext context = FacesContext.getCurrentInstance();
		ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory();
		ELContext elContext = context.getELContext();

		MethodExpression mex = expressionFactory.createMethodExpression(elContext, p_expression, returnType,
				parameterTypes);
		return mex;
	}
150747
private MethodCallExpression createMethodCallExpression(Expression baseExpr, Expression arguments) {
        return new MethodCallExpression(
                VariableExpression.THIS_EXPRESSION,

                (baseExpr instanceof VariableExpression)
                        ? this.createConstantExpression(baseExpr)
                        : baseExpr,

                arguments
        );
    }
665394
public GeometryExpression<Geometry> union(Expression<? extends Geometry> geometry) {
        return GeometryExpressions.geometryOperation(SpatialOps.UNION, mixin, geometry);
    }
520242
public <T> JDOQuery<T> select(Expression<T> expr) {
        return query().select(expr);
    }
495396
public static <T extends Geometry> GeometryExpression<T> asGeometry(T value) {
        return asGeometry(Expressions.constant(value));
    }
675296
public static JTSGeometryExpression<?> collect(Expression<? extends Geometry> expr1, Expression<? extends Geometry> expr2) {
        return geometryOperation(SpatialOps.COLLECT2, expr1, expr2);
    }