Creates a new Expression.

@param expression the expression string
@param expressionType the expression type
@param propertyResolver the property resolver
@return the Expression
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());
        }
    }
380892
function resolveExpression(expression) {
    // return empty string for undefined
    if (expression === undefined) {
        return "";
    }
    // return placeholder for promise
    if (isPromise(expression)) {
        // recursively resolve
        return "[promise]";
    }
    // return placeholder for function
    if (typeof expression === "function") {
        return "[function]";
    }
    // handle arrays
    if (Array.isArray(expression)) {
        var items = [];
        // resolve each item (might be promises as well)
        for (var _i = 0, expression_1 = expression; _i < expression_1.length; _i++) {
            var expressionItem = expression_1[_i];
            items.push(resolveExpression(expressionItem));
        }
        // join with newline
        return items.join("\n");
    }
    // return unmodified if got a string
    if (typeof expression === "string") {
        return expression;
    }
    // convert to string if got a number
    if (typeof expression === "number") {
        return expression.toString();
    }
    // return stringified value, handles circular references
    return flatted_1.stringify(expression, undefined, 2);
}
1219005
public static ValueExpression createValueExpression(PageContext pageContext, String expression, Class<?> expectedType) {
        ExpressionFactory factory = getExpressionFactory(pageContext);
        return factory.createValueExpression(pageContext.getELContext(), expression, expectedType);
    }
124219
public String resolveExpression(String expression) {
        StringBuilder result = new StringBuilder(expression.length());

        int position = 0;
        while (position < expression.length()) {
            char c = expression.charAt(position);
            if (c == '#') {
                int beginningSeparatorPosition = position;
                int endingSeparatorPosition = expression.indexOf('#', beginningSeparatorPosition + 1);
                if (endingSeparatorPosition == -1) {
                    throw new IllegalStateException("Invalid expression '" + expression + "', no ending '#' after beginning '#' at position " + beginningSeparatorPosition);
                }
                String key = expression.substring(beginningSeparatorPosition + 1, endingSeparatorPosition);
                Callable<String> expressionProcessor = expressionEvaluators.get(key);
                String value;
                if (expressionProcessor == null) {
                    value = "#unsupported_expression#";
                    logger.info("Unsupported expression '" + key + "'");
                } else {
                    try {
                        value = expressionProcessor.call();
                    } catch (Exception e) {
                        value = "#expression_error#";
                        logger.warn("Error evaluating expression '" + key + "'", e);
                    }
                }
                appendEscapedNonAlphaNumericChars(value, false, result);
                position = endingSeparatorPosition + 1;

            } else {
                result.append(c);
                position++;
            }
        }
        logger.trace("resolveExpression({}): {}", expression, result);
        return result.toString();

    }
934046
public static <E> RegularExpression<E> compile(final String expression,
            final Function<String, BaseExpression<E>> factoryDelegate) {
        return new RegularExpressionParser<E>() {
            @Override
            public BaseExpression<E> factory(String token) {
                return factoryDelegate.apply(token);
            }
        }.parse(expression);
    }
1241165
public static <E> LogicExpression<E> compile(
            final List<Expression<E>> expressions) {
        return new LogicExpression<E>(expressions);
    }
1342363
public static Statement throwExpression(final Expression expression) {
    expression.checkAssignableTo(THROWABLE_TYPE);
    return new Statement() {
      @Override
      protected void doGen(CodeBuilder adapter) {
        expression.gen(adapter);
        adapter.throwException();
      }
    };
  }
460420
public PropertyResolver createPropertyResolver(ResolverWrapper resolverAnnotation) {
		PropertyResolver resolver = null;
		
		// use the impl class to get the property resolver
		Class<? extends PropertyResolver> propertyResolverClass = resolverAnnotation.impl();
		if(propertyResolverClass == null) {
			this.logger.debug("No alternate property resolver provided, using default");
			propertyResolverClass = DefaultPropertyResolver.class;
		} else {
			this.logger.debug("Requesting alternate property resolver: {}", propertyResolverClass.getName());
		}
		resolver = this.beanResolver.resolveBeanWithDefaultClass(propertyResolverClass, DefaultPropertyResolver.class);
		
		return resolver;
	}
900027
public static QueryLexer lexer(String expression) {
        QueryLexer lexer = new QueryLexer(input(expression));
        lexer.removeErrorListeners();
        lexer.addErrorListener(ERROR_LISTENER);
        return lexer;
    }
1215761
@NonNull
    public static ValueIndexItem expression(@NonNull Expression expression) {
        if (expression == null) {
            throw new IllegalArgumentException("expression cannot be null.");
        }
        return new ValueIndexItem(expression);
    }
536765
public static UIComponent resolveComponent(FacesContext context, UIComponent source, String expression) {

        return resolveComponent(context, source, expression, SearchExpressionHint.NONE);
    }
1181660
@Pure
	protected XExpression fromString(String expression) {
		if (!Strings.isEmpty(expression)) {
			ResourceSet resourceSet = this.context.eResource().getResourceSet();
			URI uri = computeUnusedUri(resourceSet);
			Resource resource = getResourceFactory().createResource(uri);
			resourceSet.getResources().add(resource);
			try (StringInputStream is = new StringInputStream(generateExpressionCode(expression))) {
				resource.load(is, null);
				SarlScript script = resource.getContents().isEmpty() ? null : (SarlScript) resource.getContents().get(0);
				SarlEvent topElement = (SarlEvent) script.getXtendTypes().get(0);
				SarlField member = (SarlField) topElement.getMembers().get(0);
				return member.getInitialValue();
			} catch (Throwable exception) {
				throw new RuntimeException(exception);
			} finally {
				resourceSet.getResources().remove(resource);
			}
		}
		throw new IllegalArgumentException("not a valid expression");
	}
690492
public static Object getProperty(Object bean, String expression) {
		return BeanPath.create(expression).get(bean);
	}
708231
static ExpressionCompiler create(
      ExpressionDetacher.Factory detacherFactory,
      TemplateParameterLookup parameters,
      TemplateVariableManager varManager,
      ErrorReporter reporter,
      SoyTypeRegistry registry) {
    return new ExpressionCompiler(detacherFactory, parameters, varManager, reporter, registry);
  }
31118
public static Extractor createExtractor(String expression) {
        try {
            return INSTANCE.ctorExtractor.newInstance(expression);
        }
        catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
1024016
private static EvaluationContext buildEvaluationContext(final String expression) {
        return new DDRSpelEvaluationContext() {

            @Override
            public Object lookupVariable(String name) {
                Object val = null;
                if (isReservedWords(name)) {
                    val = super.lookupVariable(name);
                    if (val == null) {
                        throw new ExpressionValueNotFoundException("Value of '" + name
                                                                   + "' is not found when parsing expression '"
                                                                   + expression + "'");
                    }
                } else {
                    val = ShardRouteRuleExpressionContext.lookupVariable(name);
                }
                return val;
            }
        };
    }
783881
function convertPropertyBinding(builder, nameResolver, implicitReceiver, expression, bindingId) {
    var /** @type {?} */ currValExpr = createCurrValueExpr(bindingId);
    var /** @type {?} */ stmts = [];
    if (!nameResolver) {
        nameResolver = new DefaultNameResolver();
    }
    var /** @type {?} */ visitor = new _AstToIrVisitor(builder, nameResolver, implicitReceiver, VAL_UNWRAPPER_VAR, bindingId, false);
    var /** @type {?} */ outputExpr = expression.visit(visitor, _Mode.Expression);
    if (!outputExpr) {
        // e.g. an empty expression was given
        return null;
    }
    if (visitor.temporaryCount) {
        for (var /** @type {?} */ i = 0; i < visitor.temporaryCount; i++) {
            stmts.push(temporaryDeclaration(bindingId, i));
        }
    }
    if (visitor.needsValueUnwrapper) {
        var /** @type {?} */ initValueUnwrapperStmt = VAL_UNWRAPPER_VAR.callMethod('reset', []).toStmt();
        stmts.push(initValueUnwrapperStmt);
    }
    stmts.push(currValExpr.set(outputExpr).toDeclStmt(null, [__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["k" /* StmtModifier */].Final]));
    if (visitor.needsValueUnwrapper) {
        return new ConvertPropertyBindingResult(stmts, currValExpr, VAL_UNWRAPPER_VAR.prop('hasWrappedValue'));
    }
    else {
        return new ConvertPropertyBindingResult(stmts, currValExpr, null);
    }
}