Examples of parseExpression()


Examples of org.springframework.expression.spel.standard.SpelExpressionParser.parseExpression()

    PartitionKeyMethodResolver resolver = new PartitionKeyMethodResolver();
    MessagePartitionKeyPropertyAccessor accessor = new MessagePartitionKeyPropertyAccessor();
    context.addMethodResolver(resolver);
    context.addPropertyAccessor(accessor);

    Expression expression1 = parser.parseExpression("payload");
    Expression expression2 = parser.parseExpression("timestamp");
    for (int i = 0; i<1000000; i++) {
      expression1.getValue(context, message, String.class);
      expression2.getValue(context, message, Long.class);
    }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser.parseExpression()

    MessagePartitionKeyPropertyAccessor accessor = new MessagePartitionKeyPropertyAccessor();
    context.addMethodResolver(resolver);
    context.addPropertyAccessor(accessor);

    Expression expression1 = parser.parseExpression("payload");
    Expression expression2 = parser.parseExpression("timestamp");
    for (int i = 0; i<1000000; i++) {
      expression1.getValue(context, message, String.class);
      expression2.getValue(context, message, Long.class);
    }
  }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser.parseExpression()

    Message<String> message = MessageBuilder.withPayload("jee").build();

    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();

    Expression expression1 = parser.parseExpression("payload");
    Expression expression2 = parser.parseExpression("headers.timestamp");
    for (int i = 0; i<1000000; i++) {
      expression1.getValue(context, message, String.class);
      expression2.getValue(context, message, Long.class);
    }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser.parseExpression()

    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();

    Expression expression1 = parser.parseExpression("payload");
    Expression expression2 = parser.parseExpression("headers.timestamp");
    for (int i = 0; i<1000000; i++) {
      expression1.getValue(context, message, String.class);
      expression2.getValue(context, message, Long.class);
    }
  }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser.parseExpression()

    private final Expression expression;
    private final MessageExpressionMethods methods;

    public MessagePartitionResolver(String expression, EvaluationContext evaluationContext) {
      ExpressionParser parser = new SpelExpressionParser();
      this.expression = parser.parseExpression(expression);
      this.methods = new MessageExpressionMethods(evaluationContext);
      log.info("Using expression=[" + this.expression.getExpressionString() + "]");
    }

    public MessagePartitionResolver(Expression expression, EvaluationContext evaluationContext) {
View Full Code Here

Examples of org.springframework.webflow.expression.spel.WebFlowSpringELExpressionParser.parseExpression()

  }

  public void testStartWithMapper() {
    DefaultMapper attributeMapper = new DefaultMapper();
    ExpressionParser parser = new WebFlowSpringELExpressionParser(new SpelExpressionParser());
    Expression x = parser.parseExpression("attr", new FluentParserContext().evaluate(AttributeMap.class));
    Expression y = parser.parseExpression("flowScope.attr",
        new FluentParserContext().evaluate(RequestContext.class));
    attributeMapper.addMapping(new DefaultMapping(x, y));
    flow.setInputMapper(attributeMapper);
    MockRequestControlContext context = new MockRequestControlContext(flow);
View Full Code Here

Examples of org.springmodules.validation.valang.parser.ValangParser.parseExpression()

        StringWriter sw = new StringWriter();
        Predicate pred;

        try {
            pred = parser.parseExpression();
            translator.writeJavaScriptPredicate(sw, pred);

        } catch (ParseException e) {
            logger.debug("Valang failed parsing.");
            return null;
View Full Code Here

Examples of org.thymeleaf.standard.expression.IStandardExpressionParser.parseExpression()

    Object result = null;

    if (value.contains("${") || value.contains("@{") || value.contains("#{")) {
      Configuration configuration = arguments.getConfiguration();
      IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);
      IStandardExpression standardExpression = expressionParser.parseExpression(configuration, arguments, value);
      result = standardExpression.execute(configuration, arguments);
    }
    else {
      result = value;
    }
View Full Code Here

Examples of org.zkoss.zk.xel.Evaluator.parseExpression()

        return expr;
      return Classes.coerce(expectedType, expr);
    }

    final Evaluator eval = getEvaluator(page, null);
    final Expression expression = eval.parseExpression(expr, expectedType);
    return self instanceof Page ?
      eval.evaluate((Page)self, expression):
      eval.evaluate((Component)self, expression);
  }
View Full Code Here

Examples of our.apache.commons.jxpath.ri.parser.XPathParser.parseExpression()

            XPathParser parser = new XPathParser(new StringReader(expression));
            parser.setCompiler(getCompiler());
            our.apache.commons.jxpath.ri.compiler.Expression e =
                    (our.apache.commons.jxpath.ri.compiler.Expression)
                            parser.parseExpression();

            // return the Expression object
            return new JXPathExpression(
                    factory,
                    new JXPathCompiledExpression(expression, e));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.